« 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.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/urls.js b/src/urls.js
index 1a471b30..71173f7f 100644
--- a/src/urls.js
+++ b/src/urls.js
@@ -11,6 +11,13 @@ import {withEntries} from '#sugar';
 export * from './url-spec.js';
 
 export function generateURLs(urlSpec) {
+  if (
+    typeof urlSpec.localized === 'object' &&
+    typeof urlSpec.localizedWithBaseDirectory !== 'object'
+  ) {
+    throw new Error(`Provided urlSpec missing localizedWithBaseDirectory`);
+  }
+
   const getValueForFullKey = (obj, fullKey) => {
     const [groupKey, subKey] = fullKey.split('.');
     if (!groupKey || !subKey) {