Skip to content

Commit

Permalink
collapse: fix error with jQuery v3.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Apr 11, 2020
1 parent 6490a4e commit 1f3137f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/collapse.js
Expand Up @@ -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
}

Expand Down

0 comments on commit 1f3137f

Please sign in to comment.