mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-07 19:40:54 +01:00
Fix rare issue with malformed expanded link data
This commit is contained in:
parent
9a9ca5381e
commit
eb565e689a
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ export const linkFixer = (entities: TcoExpansion[] | undefined, text: string): s
|
|||
// });
|
||||
if (Array.isArray(entities) && entities.length) {
|
||||
entities.forEach((url: TcoExpansion) => {
|
||||
let newURL = url.expanded_url;
|
||||
let newURL = url.expanded_url ?? url.url ?? '';
|
||||
|
||||
if (newURL.match(/^https:\/\/twitter\.com\/i\/web\/status\/\w+/g) !== null) {
|
||||
newURL = '';
|
||||
|
|
Loading…
Add table
Reference in a new issue