diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-06-10 18:40:52 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-06-17 16:58:56 +0300 |
commit | 94a5d87e15092b090aff70d0bae88d2ff406076e (patch) | |
tree | f6506802d0ec17e04f8db849ba47379b3ab62466 /js/src/util | |
parent | 9f9e4d04a127b3505f01bb6c341d3d40430f39ff (diff) |
Unbreak short lines
Diffstat (limited to 'js/src/util')
-rw-r--r-- | js/src/util/index.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/js/src/util/index.js b/js/src/util/index.js index 59efa6655d..d9a975554c 100644 --- a/js/src/util/index.js +++ b/js/src/util/index.js @@ -110,21 +110,20 @@ const emulateTransitionEnd = (element, duration) => { } const typeCheckConfig = (componentName, config, configTypes) => { - Object.keys(configTypes) - .forEach(property => { - const expectedTypes = configTypes[property] - const value = config[property] - const valueType = value && isElement(value) ? - 'element' : - toType(value) - - if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error( - `${componentName.toUpperCase()}: ` + - `Option "${property}" provided type "${valueType}" ` + - `but expected type "${expectedTypes}".`) - } - }) + Object.keys(configTypes).forEach(property => { + const expectedTypes = configTypes[property] + const value = config[property] + const valueType = value && isElement(value) ? + 'element' : + toType(value) + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error( + `${componentName.toUpperCase()}: ` + + `Option "${property}" provided type "${valueType}" ` + + `but expected type "${expectedTypes}".`) + } + }) } const isVisible = element => { |