1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-27 22:09:04 +02:00

Unbreak short lines

This commit is contained in:
XhmikosR
2020-06-10 18:40:52 +03:00
parent 9f9e4d04a1
commit 94a5d87e15
6 changed files with 40 additions and 58 deletions

View File

@@ -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)
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}".`)
}
})
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(
`${componentName.toUpperCase()}: ` +
`Option "${property}" provided type "${valueType}" ` +
`but expected type "${expectedTypes}".`)
}
})
}
const isVisible = element => {