Fix: createOption in one line
This commit is contained in:
parent
3a78681d9e
commit
6358162bec
|
@ -159,9 +159,7 @@ var usercss = (() => {
|
||||||
if (Array.isArray(state.value)) {
|
if (Array.isArray(state.value)) {
|
||||||
result.options = state.value.map(text => createOption(text));
|
result.options = state.value.map(text => createOption(text));
|
||||||
} else {
|
} else {
|
||||||
result.options = Object.keys(state.value).map(k =>
|
result.options = Object.keys(state.value).map(k => createOption(k, state.value[k]));
|
||||||
createOption(k, state.value[k])
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
result.default = result.options[0].name;
|
result.default = result.options[0].name;
|
||||||
} else if (state.type === 'dropdown' || state.type === 'image') {
|
} else if (state.type === 'dropdown' || state.type === 'image') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user