From 4b7895a8dee9b37d7238f13cb6926332337c2bf7 Mon Sep 17 00:00:00 2001 From: Devon Thomson Date: Thu, 16 Apr 2020 10:41:57 -0400 Subject: [PATCH] Fixed 0s not being checked for duplicates correctly (#63632) Fixes duplicate 0 values being allowed in the visualize percentiles input. --- .../public/components/controls/components/number_list/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/vis_default_editor/public/components/controls/components/number_list/utils.ts b/src/plugins/vis_default_editor/public/components/controls/components/number_list/utils.ts index c2ac63c98cbea..dac86249ebbb9 100644 --- a/src/plugins/vis_default_editor/public/components/controls/components/number_list/utils.ts +++ b/src/plugins/vis_default_editor/public/components/controls/components/number_list/utils.ts @@ -92,7 +92,7 @@ function validateValueUnique( isDuplicate: false, }; - if (inputValue && list.indexOf(inputValue) !== index) { + if (inputValue !== EMPTY_STRING && list.indexOf(inputValue) !== index) { result.isDuplicate = true; result.error = i18n.translate( 'visDefaultEditor.controls.numberList.duplicateValueErrorMessage',