mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(view) init config: copy
This commit is contained in:
parent
50e0152ced
commit
27df34f000
2 changed files with 8 additions and 0 deletions
|
|
@ -69,11 +69,13 @@ async function show() {
|
|||
const button = createElement('button', {
|
||||
className: 'cloudcmd-user-menu-button',
|
||||
innerText: 'User Menu',
|
||||
notAppend: true,
|
||||
});
|
||||
|
||||
const select = createElement('select', {
|
||||
className: 'cloudcmd-user-menu',
|
||||
innerHTML: fillTemplate(names),
|
||||
notAppend: true,
|
||||
size: 10,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ const Images = require('../dom/images');
|
|||
|
||||
const {encode} = require('../../common/entity');
|
||||
|
||||
const {assign} = Object;
|
||||
const {isArray} = Array;
|
||||
|
||||
const testRegExp = currify((name, reg) => reg.test(name));
|
||||
const lifo = currify((fn, el, cb, name) => fn(name, el, cb));
|
||||
|
||||
|
|
@ -184,7 +186,11 @@ function viewFile() {
|
|||
});
|
||||
}
|
||||
|
||||
const copy = (a) => assign({}, a);
|
||||
|
||||
function initConfig(config, options) {
|
||||
config = copy(config);
|
||||
|
||||
if (!options)
|
||||
return config;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue