Skip to content

Commit

Permalink
fix(@uform/utils): fix isEmpty'result is not correct when ['','']
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Mar 28, 2019
1 parent 90c4fa4 commit 091c2f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/src/isEmpty.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function isEmpty(val) {
if (Array.isArray(val)) {
if (val.length === 0) return true
for (let i = 0; i < val.length; i++) {
if (val[i] !== undefined && val[i] !== null) {
if (val[i] !== undefined && val[i] !== null && val[i] !== '' && val[i] !== 0) {
return false
}
}
Expand Down

0 comments on commit 091c2f1

Please sign in to comment.