« get me outta code hell

don't inherit strings in the wrong direction lol - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-05-12 23:54:28 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-05-12 23:54:28 -0300
commit44104a8970a10dff2894745f0c904644ca3234e0 (patch)
tree75978b75d745181b7b2f4c433dd5f763f312b3ad
parent3b770c69507ef139cd07f5335aefba33217d43ad (diff)
don't inherit strings in the wrong direction lol
-rw-r--r--src/data/things.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/data/things.js b/src/data/things.js
index 1865ee4..8f460e4 100644
--- a/src/data/things.js
+++ b/src/data/things.js
@@ -1447,7 +1447,7 @@ Language.propertyDescriptors = {
             dependencies: ['inheritedStrings'],
             transform(strings, { inheritedStrings }) {
                 if (strings || inheritedStrings) {
-                    return {...strings ?? {}, ...inheritedStrings ?? {}};
+                    return {...inheritedStrings ?? {}, ...strings ?? {}};
                 } else {
                     return null;
                 }
@@ -1482,8 +1482,8 @@ Language.propertyDescriptors = {
         expose: {
             dependencies: ['strings', 'inheritedStrings'],
             compute: ({ strings, inheritedStrings }) => Array.from(new Set([
-                ...Object.keys(strings ?? {}),
-                ...Object.keys(inheritedStrings ?? {})
+                ...Object.keys(inheritedStrings ?? {}),
+                ...Object.keys(strings ?? {})
             ]))
         }
     },
@@ -1494,7 +1494,7 @@ Language.propertyDescriptors = {
             dependencies: ['strings', 'inheritedStrings', 'escapeHTML'],
             compute({ strings, inheritedStrings, escapeHTML }) {
                 if (!(strings || inheritedStrings) || !escapeHTML) return null;
-                const allStrings = {...strings ?? {}, ...inheritedStrings ?? {}};
+                const allStrings = {...inheritedStrings ?? {}, ...strings ?? {}};
                 return Object.fromEntries(Object.entries(allStrings)
                     .map(([ k, v ]) => [k, escapeHTML(v)]));
             }