Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

fix Cannot read property 'indexOf' of undefined#163

Merged
ghiscoding merged 2 commits intoghiscoding:masterghiscoding/angular-validation:masterfrom
noherczeg:patch-2Copy head branch name to clipboard
Aug 16, 2017
Merged

fix Cannot read property 'indexOf' of undefined#163
ghiscoding merged 2 commits intoghiscoding:masterghiscoding/angular-validation:masterfrom
noherczeg:patch-2Copy head branch name to clipboard

Conversation

@noherczeg
Copy link
Contributor

The .rules property could be an empty string in which case the code dies because it uses self.validatorAttrs.validation which could be undefined, therefore the .indexOf check fails.
This fixes TypeError: Cannot read property 'indexOf' of undefined.

The `.rules` property could be an empty string in which case the code dies because it uses `self.validatorAttrs.validation` which could be undefined, therefore the `.indexOf` check fails.
This fixes TypeError: Cannot read property 'indexOf' of undefined.
@ghiscoding
Copy link
Owner

Thanks for the fix, I will merge and run the tests. It's actually cool, I didn't know we could write this way to deal with double safe, thanks for the tip :)

@ghiscoding ghiscoding merged commit a05982f into ghiscoding:master Aug 16, 2017
@noherczeg
Copy link
Contributor Author

Sadly I couldn't use this lib because I couldn't make it to work with kendo components + getterSetters :(

Hopefully my fixes are worthy anyway.

ghiscoding added a commit that referenced this pull request Aug 17, 2017
@ghiscoding
Copy link
Owner

All merged and release, thanks for the PR :)
Here's the latest version 1.5.23 and on NPM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.