diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index 16dfc70..2389252 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -219,7 +219,9 @@ } } getSelections(this.data); - selections = selections.filter(item => item.label.indexOf(this.query) > -1).map(item => { + selections = selections.filter(item => { + return item.label ? item.label.indexOf(this.query) > -1 : false + }).map(item => { item.display = item.display.replace(new RegExp(this.query, 'g'), `${this.query}`); return item; }); -- libgit2 0.21.4