diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2022-11-03 21:54:16 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2023-02-19 21:25:18 -0800 |
commit | ff10cb81845cef5bea2b33c9f24aac2598217d19 (patch) | |
tree | a5ac39f92b74a40b0e3bf260ae516bba07f5caf5 /modules/script | |
parent | 18d3e214532daf3bba8412d4c94c5b75e40d96bf (diff) | |
download | gjs-ff10cb81845cef5bea2b33c9f24aac2598217d19.tar.gz |
debugger: Use spread syntax to override style property
This was previously done with a slightly circuitous call to
Object.assign(); it can be done more readably with spread syntax.
Diffstat (limited to 'modules/script')
-rw-r--r-- | modules/script/_bootstrap/debugger.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/script/_bootstrap/debugger.js b/modules/script/_bootstrap/debugger.js index c25893e0..e57d6c3c 100644 --- a/modules/script/_bootstrap/debugger.js +++ b/modules/script/_bootstrap/debugger.js @@ -69,9 +69,7 @@ function debuggeeValueToString(dv, style = {pretty: options.pretty}) { if (style.noerror) return [dvrepr, undefined]; - const substyle = {}; - Object.assign(substyle, style); - substyle.noerror = true; + const substyle = {...style, noerror: true}; return [dvrepr, debuggeeValueToString(str.throw, substyle)]; } |