From ba3ccc38c2106765523279319234af3746a5d482 Mon Sep 17 00:00:00 2001 From: Abhishek <88230286+Abhii5496@users.noreply.github.com> Date: Wed, 9 Oct 2024 07:29:28 +0000 Subject: [PATCH] resolved conflict & updated code --- src/services.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/services.ts b/src/services.ts index 15d31ec5..79115930 100644 --- a/src/services.ts +++ b/src/services.ts @@ -137,12 +137,7 @@ const SERVICES: ServicesConfigType = { html: '', height: 505, width: 400, - id: (groups) => { - if (groups.length > 0) { - const item = groups[0].split("/"); - return item[0]; - } - }, + id: (groups: string[]) => groups?.[0]?.split("/")[0], }, twitter: { regex: /^https?:\/\/(www\.)?(?:twitter\.com|x\.com)\/.+\/status\/(\d+)/,