Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

fix Cannot read property 'indexOf' of undefined #163

Merged
merged 2 commits into from
Aug 16, 2017
Merged

fix Cannot read property 'indexOf' of undefined #163

merged 2 commits into from
Aug 16, 2017

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