Skip to content

Commit 0803195

Browse files
committed
fix(validation): number 0 should NOT treated as empty value
1 parent 2ab0136 commit 0803195

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/scripts/mixins/validatable

src/scripts/mixins/validatable/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function isEmpty (value) {
77
return value.length === 0
88
}
99
if (typeof value === 'boolean') return !value
10-
if (typeof value === 'number') return value === 0
10+
if (typeof value === 'number') return false
1111
if (typeof value === 'object') return Object.keys(value).length === 0
1212
}
1313

0 commit comments

Comments
 (0)