Skip to content

Gracefully handle null and undefined values#1

Open
callmephilip wants to merge 1 commit intowegolook:masterfrom
bakery:fix/handle-null-and-undefined
Open

Gracefully handle null and undefined values#1
callmephilip wants to merge 1 commit intowegolook:masterfrom
bakery:fix/handle-null-and-undefined

Conversation

@callmephilip
Copy link
Copy Markdown

In the current implementation, if one passes null or undefined to the validator, it fails with an exception TypeError: Cannot read property 'toLowerCase' of null/undefined. This PR fixes this by adjusting the validator to return false instead

Copy link
Copy Markdown

@ej3076 ej3076 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants