« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'upd8.js')
-rwxr-xr-xupd8.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/upd8.js b/upd8.js
index 7ec6b55c..8d22f645 100755
--- a/upd8.js
+++ b/upd8.js
@@ -1097,13 +1097,19 @@ const replacerSpec = {
 
                 // Assign first & second to replacer key/value
 
+                let replacerKey,
+                    replacerValue;
+
                 // Value is an array of nodes, 8ut key is just one (or null).
                 // So if we use replacerFirst as the value, we need to stick
                 // it in an array (on its own).
-                const [ replacerKey, replacerValue ] =
-                    (replacerSecond
-                        ? [replacerFirst, replacerSecond]
-                        : [null, [replacerFirst]]);
+                if (replacerSecond) {
+                    replacerKey = replacerFirst;
+                    replacerValue = replacerSecond;
+                } else {
+                    replacerKey = null;
+                    replacerValue = [replacerFirst];
+                }
 
                 // Arguments