« get me outta code hell

validators: validateReference: fix multiple type validation - 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-11-16 07:44:30 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-16 07:44:30 -0400
commit7f67977621bae27fc94fffc874362a5300667d24 (patch)
tree59c610baf7024e745a9ab5038d6c1441b527d880 /src
parentf499d60797b8c4a86d6cae2cf5cb1574971a8489 (diff)
validators: validateReference: fix multiple type validation
Oooooooooooops
Diffstat (limited to 'src')
-rw-r--r--src/data/validators.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/validators.js b/src/data/validators.js
index 2c99be0c..d2d1aa25 100644
--- a/src/data/validators.js
+++ b/src/data/validators.js
@@ -804,7 +804,7 @@ export function validateReference(type) {
 
     if (typePart) {
       if (Array.isArray(type)) {
-        if (!typePart.includes(type)) {
+        if (!type.includes(typePart)) {
           throw new TypeError(
             `Expected ref to begin with one of ` +
             type.map(type => `"${type}:"`).join(', ') +