From c25cc9a01cf8acb23b8f5e8910a86cdfb5fc7c20 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Thu, 11 Jul 2019 10:41:16 +0300 Subject: [PATCH] Cover undefined as well --- src/components/dropdown/Dropdown.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dropdown/Dropdown.vue b/src/components/dropdown/Dropdown.vue index 3315819e7..9c9c81691 100644 --- a/src/components/dropdown/Dropdown.vue +++ b/src/components/dropdown/Dropdown.vue @@ -87,7 +87,7 @@ export default { getSelectedOption() { let selectedOption; - if (this.value !== null && this.options) { + if (this.value != null && this.options) { for (let option of this.options) { if ((ObjectUtils.equals(this.value, this.getOptionValue(option), this.dataKey))) { selectedOption = option; @@ -104,7 +104,7 @@ export default { getSelectedOptionIndex() { let selectedOptionIndex = -1; - if (this.value !== null && this.visibleOptions) { + if (this.value != null && this.visibleOptions) { for (let i = 0; i < this.visibleOptions.length; i++) { if ((ObjectUtils.equals(this.value, this.getOptionValue(this.visibleOptions[i]), this.dataKey))) { selectedOptionIndex = i;