diff --git a/client/edit.js b/client/edit.js index a3659bf1..1e73fda8 100644 --- a/client/edit.js +++ b/client/edit.js @@ -59,16 +59,13 @@ function EditProto(callback) { throw Error(name + ' should be a function!'); } - function initConfig(config = {}, options) { - Object.assign(config, ConfigView); - - if (!options) - return config; + function initConfig(options = {}) { + const config = Object.assign({}, options, ConfigView); if (options.afterShow) { checkFn('options.afterShow', options.afterShow); - const afterShow = config.afterShow; + const afterShow = {config}; config.afterShow = () => { afterShow();