mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03: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:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user