Skip to content

Commit

Permalink
Backport bootstrap 4 fix for jQuery 3.5
Browse files Browse the repository at this point in the history
* Bootstrap 4 issue: twbs/bootstrap#30553
* Bootstrap 4 fix: twbs/bootstrap#30559

Signed-off-by: John Dell <john@mutations.ltd>
  • Loading branch information
spovich committed May 21, 2020
1 parent b34765d commit 3b09cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/javascripts/bootstrap/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)

if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data && options.toggle && typeof option === 'string' && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
Expand Down

0 comments on commit 3b09cd5

Please sign in to comment.