]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
collapse: fix error with jQuery v3.5.0.
authorXhmikosR <xhmikosr@gmail.com>
Sat, 11 Apr 2020 15:26:46 +0000 (18:26 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 17 Apr 2020 08:41:32 +0000 (11:41 +0300)
js/src/collapse.js

index 4243019a8e88880e47c3ed57b453556f5fce8d38..39fd62bccf6df7fd6b93bf99ee3501a944d3f924 100644 (file)
@@ -335,7 +335,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
       }