« get me outta code hell

data: WikiInfo: make canonicalBase always end with slash - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-09-11 20:24:23 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-09-11 20:24:23 -0300
commitdd841e85e0f2cbd6b4a57fb9741111ed7c88df9f (patch)
treec906a68caead956e44dbbbc1617707c5d40d02ec /src
parenta28798293daaec40df392fe8f246e98a066f94a4 (diff)
data: WikiInfo: make canonicalBase always end with slash
Diffstat (limited to 'src')
-rw-r--r--src/data/things/wiki-info.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/data/things/wiki-info.js b/src/data/things/wiki-info.js
index b7b7b01c..57446f3f 100644
--- a/src/data/things/wiki-info.js
+++ b/src/data/things/wiki-info.js
@@ -59,6 +59,12 @@ export class WikiInfo extends Thing {
     canonicalBase: {
       flags: {update: true, expose: true},
       update: {validate: isURL},
+      expose: {
+        transform: (value) =>
+          (value.endsWith('/')
+            ? value
+            : value + '/'),
+      },
     },
 
     divideTrackListsByGroups: referenceList({