Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2020-04-17 15:09:51 +0300
committerGitHub <noreply@github.com>2020-04-17 15:09:51 +0300
commit8547ab149a9406937c0ec4f0c7864a8884b63d64 (patch)
treef28bd2a9b345af810e613b4cf144b43c4824e38a /js/src/collapse.js
parent6b5f055a7deba265390d05c8f949c4f870dde3ec (diff)
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`
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r--js/src/collapse.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index 4529a85ec3..4941ff0ac8 100644
--- a/js/src/collapse.js
+++ b/js/src/collapse.js
@@ -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
}