]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix weird case with jQuery
authorJohann-S <johann.servoire@gmail.com>
Mon, 2 Oct 2017 12:14:07 +0000 (14:14 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 20 Feb 2019 20:05:45 +0000 (22:05 +0200)
js/src/collapse.js

index 9c7ff927766563606a4096351501dd08ffd4eb02..9da673cc9f9a266501a7a44772634a7472718666 100644 (file)
@@ -289,8 +289,8 @@ class Collapse {
     if (Util.isElement(this._config.parent)) {
       parent = this._config.parent
 
-      // It's a jQuery object
-      if (typeof this._config.parent.jquery !== 'undefined') {
+      // it's a jQuery object
+      if (typeof this._config.parent.jquery !== 'undefined' || typeof this._config.parent[0] !== 'undefined') {
         parent = this._config.parent[0]
       }
     } else {