Commit 6ba03ac2 authored by Florian Müllner's avatar Florian Müllner Committed by Georges Basile Stavracas Neto

params: Don't use Lang module

To copy the passed in default parameters, we can just as well use
another Object.assign() call.

parent 55c717c2
Pipeline #94344 passed with stages
in 4 minutes and 32 seconds
// -*- 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment