Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

isUndefined and isDefined should be used more consistently #4365

Closed
wnr opened this issue Oct 10, 2013 · 1 comment
Closed

isUndefined and isDefined should be used more consistently #4365

wnr opened this issue Oct 10, 2013 · 1 comment

Comments

@wnr
Copy link

wnr commented Oct 10, 2013

I noticed the functions isUndefined and isDefined in src/Angular.js, which seems like a good idea to standardise the checking of defined/undefined variables. However, I noticed that still checks for undefined/defined are done without these functions in quite some places throughout the code. Have a look at the equals function defined in src/Angular.js around line 752, as an example. There the statement o2[key] !== undefinedcan be found. It seems to me that this should instead be isDefined(o2[key]) to keep the consistency and obey the defined/undefined check standardisation.

tl;dr; Only isDefinedand `isUndefined`` should be used the check for undefined/defined variables.

If this is desired, I would happily create a pull request fixing this.

@petebacondarwin
Copy link
Contributor

I agree. I am looking into running jshint (or similar) against the code base as part of the build. This would help with this.

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

No branches or pull requests

3 participants