Skip to content

Commit

Permalink
Roll back to use spread syntax since it not supported by nodejs < 8.3 (
Browse files Browse the repository at this point in the history
…fixes #145)
  • Loading branch information
lahmatiy committed Nov 26, 2020
1 parent b4ea80f commit 053149c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## next

- Rolled back to use spread syntax in object literals since it not supported by nodejs < 8.3 (#145)

## 1.1.1 (November 18, 2020)

- Fixed edge cases in mismatch location computation for `SyntaxMatchError`
Expand Down
4 changes: 2 additions & 2 deletions lib/syntax/config/mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function isObject(value) {

function copy(value) {
return isObject(value)
? { ...value }
? Object.assign({}, value)
: value;
}

Expand Down Expand Up @@ -57,7 +57,7 @@ function appendOrAssign(a, b) {
return append(a, b);
}

const result = { ...a };
const result = Object.assign({}, a);
for (let key in b) {
if (hasOwnProperty.call(b, key)) {
result[key] = append(hasOwnProperty.call(a, key) ? a[key] : undefined, b[key]);
Expand Down

0 comments on commit 053149c

Please sign in to comment.