« get me outta code hell

external-links: minor code fixes - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/external-links.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-24 13:43:34 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-24 14:18:27 -0400
commit803a17296249e1521089451c9d077cc524b4acf5 (patch)
tree0802f7a53287fb68c6320596f56a2a88c2881b63 /src/util/external-links.js
parent153a9f927073d69773af9bf30a53e94cac91d5a9 (diff)
external-links: minor code fixes
Diffstat (limited to 'src/util/external-links.js')
-rw-r--r--src/util/external-links.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/external-links.js b/src/util/external-links.js
index 07a83bc..dee65cc 100644
--- a/src/util/external-links.js
+++ b/src/util/external-links.js
@@ -380,7 +380,7 @@ export function extractPartFromExternalLink(url, extract) {
   let prefix = '';
 
   if (extract instanceof RegExp) {
-    regexen.push(descriptor.handle);
+    regexen.push(extract);
     tests.push(url);
   } else {
     for (const [key, value] of Object.entries(extract)) {
@@ -403,6 +403,7 @@ export function extractPartFromExternalLink(url, extract) {
 
         case 'query':
           tests.push(query.slice(1));
+          break;
 
         default:
           tests.push('');