From 57c084dd8bb4d9c5de6747b149d253ef813cb0c0 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 26 Oct 2017 12:18:30 -0400 Subject: [PATCH] fallback truthiness check on option label In case getOptionLabel somehow returns undefined. Overkill, but inexpensive overkill. --- src/components/Select.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index dc5f3ff..616d9d0 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -483,19 +483,19 @@ return option; } }, - + /** - * Callback to filter the search result the label text. - * @type {Function} - * @param {Object || String} option - * @param {String} label + * Callback to filter the search result the label text. + * @type {Function} + * @param {Object || String} option + * @param {String} label * @param {String} search * @return {Boolean} */ filterFunction: { type: Function, default(option, label, search) { - return label.toLowerCase().indexOf(search.toLowerCase()) > -1 + return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1 } },