diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-06-28 21:41:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-28 21:41:34 +0900 |
commit | d0c23587f8ee8c1bca38f036ae8f71078d6ca937 (patch) | |
tree | 2c5cb4aea22de3de6360220a6291440c7ac18230 /src/shared | |
parent | 6d0732eb80f2a2b2546e659662537bf4e40d7e5c (diff) | |
parent | 05faaced137eb3a48780806fded04fd76bd9a84e (diff) |
Merge pull request #423 from ueokande/greenkeeper/eslint-5.0.1
Update eslint
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/settings/storage.js | 6 | ||||
-rw-r--r-- | src/shared/settings/values.js | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/shared/settings/storage.js b/src/shared/settings/storage.js index 87843ed..5dce3b0 100644 --- a/src/shared/settings/storage.js +++ b/src/shared/settings/storage.js @@ -6,7 +6,7 @@ const loadRaw = async() => { if (!settings) { return DefaultSettings; } - return Object.assign({}, DefaultSettings, settings); + return { ...DefaultSettings, ...settings }; }; const loadValue = async() => { @@ -20,9 +20,7 @@ const loadValue = async() => { if (!value.properties) { value.properties = {}; } - return Object.assign({}, - settingsValues.valueFromJson(DefaultSettings.json), - value); + return { ...settingsValues.valueFromJson(DefaultSettings.json), ...value }; }; const save = (settings) => { diff --git a/src/shared/settings/values.js b/src/shared/settings/values.js index bd03be2..9828af6 100644 --- a/src/shared/settings/values.js +++ b/src/shared/settings/values.js @@ -6,12 +6,12 @@ const operationFromFormName = (name) => { if (argStr) { args = JSON.parse(argStr); } - return Object.assign({ type }, args); + return { type, ...args }; }; const operationToFormName = (op) => { let type = op.type; - let args = Object.assign({}, op); + let args = { ...op }; delete args.type; if (Object.keys(args).length === 0) { @@ -83,7 +83,7 @@ const formFromValue = (value, allowedOps) => { } } - let formProperties = Object.assign({}, properties.defaults, value.properties); + let formProperties = { ...properties.defaults, ...value.properties }; return { keymaps, |