mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
params: Don't use Lang module
To copy the passed in default parameters, we can just as well use another Object.assign() call. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/616
This commit is contained in:
parent
55c717c2dc
commit
6ba03ac2a6
1 changed files with 1 additions and 4 deletions
|
|
@ -1,7 +1,5 @@
|
|||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const Lang = imports.lang;
|
||||
|
||||
// parse:
|
||||
// @params: caller-provided parameter object, or %null
|
||||
// @defaults-provided defaults object
|
||||
|
|
@ -23,7 +21,6 @@ function parse(params = {}, defaults, allowExtras) {
|
|||
throw new Error(`Unrecognized parameter "${prop}"`);
|
||||
}
|
||||
|
||||
let defaultsCopy = {};
|
||||
Lang.copyProperties(defaults, defaultsCopy);
|
||||
let defaultsCopy = Object.assign({}, defaults);
|
||||
return Object.assign(defaultsCopy, params);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue