mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-26 23:54:23 +01:00
collapse: don't rely on implicit conversion (#30566)
`config` can be an `Object` and we only need to test for `hide` or `show` if it's a `String`
This commit is contained in:
parent
6b5f055a7d
commit
8547ab149a
@ -346,7 +346,7 @@ class Collapse {
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
}
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||
_config.toggle = false
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user