Skip to content

Commit

Permalink
params: don't return reference to defaults object, make a copy instead (
Browse files Browse the repository at this point in the history
  • Loading branch information
germanfr authored and clefebvre committed Oct 23, 2018
1 parent 7456b19 commit d111769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/misc/params.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function parse(params, defaults, allowExtras) {
let ret = {};

if (!params)
return defaults;
return Object.assign({}, defaults);

for (let prop in params) {
if (!(prop in defaults) && !allowExtras)
Expand Down

0 comments on commit d111769

Please sign in to comment.