This repository was archived by the owner on Apr 12, 2024. It is now read-only.
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
Description
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] !== undefined
can 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 isDefined
and `isUndefined`` should be used the check for undefined/defined variables.
If this is desired, I would happily create a pull request fixing this.