diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-08 21:40:12 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-08 21:40:12 +0900 |
commit | d23c190cad81ec2109f69b4afa957194d029caaf (patch) | |
tree | d4252fa0d447f3a200b3e6260965410bf1b2d942 /src | |
parent | 3dbdcdba074f020f88bd4d1f5554d49549973ccd (diff) |
default properties
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/settings/validator.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/settings/validator.js b/src/shared/settings/validator.js index 744f63d..1589420 100644 --- a/src/shared/settings/validator.js +++ b/src/shared/settings/validator.js @@ -1,4 +1,5 @@ import operations from 'shared/operations'; +import * as properties from './properties'; const VALID_TOP_KEYS = ['keymaps', 'search', 'blacklist', 'properties']; const VALID_OPERATION_VALUES = Object.keys(operations).map((key) => { @@ -48,12 +49,12 @@ const validateSearch = (search) => { } }; -const validateProperties = (properties) => { - for (let name of Object.keys(properties)) { +const validateProperties = (props) => { + for (let name of Object.keys(props)) { if (!properties.types[name]) { throw new Error(`Unknown property name: "${name}"`); } - if (typeof properties[name] !== properties.types[name]) { + if (typeof props[name] !== properties.types[name]) { throw new Error(`Invalid type for property: "${name}"`); } } |