collapsible.js: Only apply external expansions/collapses if necessary

This commit is contained in:
Johannes Meyer 2019-07-10 09:51:06 +02:00
parent 2fd7ba5aed
commit c05291296a
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@
var _this = event.data.self;
var $collapsible = $(collapsiblePath);
if ($collapsible.length) {
if ($collapsible.length && $collapsible.is('.can-collapse')) {
_this.expand($collapsible);
}
};
@ -109,7 +109,7 @@
var _this = event.data.self;
var $collapsible = $(collapsiblePath);
if ($collapsible.length) {
if ($collapsible.length && _this.canCollapse($collapsible)) {
_this.collapse($collapsible);
}
};