Fix: createOption in one line

This commit is contained in:
eight 2017-11-09 08:25:30 +08:00
parent 3a78681d9e
commit 6358162bec

View File

@ -159,9 +159,7 @@ var usercss = (() => {
if (Array.isArray(state.value)) {
result.options = state.value.map(text => createOption(text));
} else {
result.options = Object.keys(state.value).map(k =>
createOption(k, state.value[k])
);
result.options = Object.keys(state.value).map(k => createOption(k, state.value[k]));
}
result.default = result.options[0].name;
} else if (state.type === 'dropdown' || state.type === 'image') {