Fixed 0s not being checked for duplicates correctly (#63632)

Fixes duplicate 0 values being allowed in the visualize percentiles input.
This commit is contained in:
Devon Thomson 2020-04-16 10:41:57 -04:00 committed by GitHub
parent 560e01a38f
commit 4b7895a8de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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',