diff options
Diffstat (limited to 'upd8.js')
-rwxr-xr-x | upd8.js | 14 |
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 |