« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/urls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/urls.js')
-rw-r--r--src/urls.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/urls.js b/src/urls.js
index 5e334c1e..9cc4a554 100644
--- a/src/urls.js
+++ b/src/urls.js
@@ -283,9 +283,14 @@ export function getURLsFrom({
       to = targetFullKey;
     }
 
-    return (
-      subdirectoryPrefix +
-      urls.from(from).to(to, ...args));
+    const toResult =
+      urls.from(from).to(to, ...args);
+
+    if (getOrigin(toResult)) {
+      return toResult;
+    } else {
+      return subdirectoryPrefix + toResult;
+    }
   };
 }