From 68a09934a1f38c0d0ea3fabc64a5390894d931fa Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 27 May 2025 19:39:39 -0300 Subject: eslint: make use of optional catch binding more often --- src/content/dependencies/linkExternal.js | 2 +- src/content/dependencies/transformContent.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/linkExternal.js b/src/content/dependencies/linkExternal.js index c132baaf..45c08a08 100644 --- a/src/content/dependencies/linkExternal.js +++ b/src/content/dependencies/linkExternal.js @@ -55,7 +55,7 @@ export default { try { new URL(data.url); urlIsValid = true; - } catch (error) { + } catch { urlIsValid = false; } diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js index fcdc3aa4..69ecf5a4 100644 --- a/src/content/dependencies/transformContent.js +++ b/src/content/dependencies/transformContent.js @@ -537,7 +537,7 @@ export default { try { link.getSlotDescription('preferShortName'); hasPreferShortNameSlot = true; - } catch (error) { + } catch { hasPreferShortNameSlot = false; } @@ -550,7 +550,7 @@ export default { try { link.getSlotDescription('tooltipStyle'); hasTooltipStyleSlot = true; - } catch (error) { + } catch { hasTooltipStyleSlot = false; } -- cgit 1.3.0-6-gf8a5