Fixed error "Cannot read property 'clear' of undefined" thrown if search option set to `false`.

This commit is contained in:
Miroslav Hibler 2016-01-15 20:22:39 +01:00
parent 23c580a2ec
commit ca21876fa3
1 changed files with 4 additions and 2 deletions

View File

@ -145,7 +145,9 @@ treemode.set = function (json, name) {
}
// clear search
this.searchBox.clear();
if (this.searchBox) {
this.searchBox.clear();
}
};
/**
@ -1147,4 +1149,4 @@ module.exports = [
mixin: treemode,
data: 'json'
}
];
];