revert 93c9c206e6, and fix the bug by

typeof
pull/2408/head
吴亮 2017-01-12 14:33:24 +08:00 committed by 杨奕
parent 6362cbce30
commit e5fa4acfcc
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@
handleSelect(filterValue) {
this.filterValue = filterValue;
if (filterValue || filterValue === 0) {
if (typeof(filterValue) === "number" && filterValue >= 0) {
this.confirmFilter(this.filteredValue);
} else {
this.confirmFilter([]);
@ -129,7 +129,7 @@
},
set(value) {
if (this.filteredValue) {
if (value || value === 0) {
if (typeof(value) === "number" && value >= 0) {
this.filteredValue.splice(0, 1, value);
} else {
this.filteredValue.splice(0, 1);