Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
fix(isEmpty): null is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSharpieOne committed Oct 18, 2018
1 parent 4437b16 commit 0d354be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AvValidator/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import isUndefined from 'lodash/isUndefined';
export const isoDateFormat = 'YYYY-MM-DD';

export function isEmpty(value) {
return isUndefined(value) || (isString(value) && value.trim() === '') || value === false || (Array.isArray(value) && value.length === 0 );
return isUndefined(value) || value === null || (isString(value) && value.trim() === '') || value === false || (Array.isArray(value) && value.length === 0 );
}

export const inputType = {date: false, number: false, time: false, month: false, week: false};
Expand Down

0 comments on commit 0d354be

Please sign in to comment.