From 2775b49ce7dca0a7aab2cfcf928c40a70054905a Mon Sep 17 00:00:00 2001 From: keyan Date: Tue, 4 Jun 2024 12:10:37 -0500 Subject: [PATCH] fix inconsistency in url handling and don't let parseEmbedURL throw --- components/text.js | 58 ++++++++++++++++++-------------------- lib/url.js | 69 +++++++++++++++++++++++++++++----------------- 2 files changed, 70 insertions(+), 57 deletions(-) diff --git a/components/text.js b/components/text.js index 19f02744..59da392e 100644 --- a/components/text.js +++ b/components/text.js @@ -259,39 +259,35 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o paddingRight: '15px' } - try { - const { provider, id, meta } = parseEmbedUrl(href) - // Youtube video embed - if (provider === 'youtube') { - return ( -
- + +
+ ) + } + + // Rumble video embed + if (provider === 'rumble') { + return ( +
+
+