fix(isElement): return boolean value rather than truthy value.#4534
fix(isElement): return boolean value rather than truthy value.#4534caitp wants to merge 1 commit into
truthy value.#4534Conversation
|
Thanks for the PR!
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
angular.isElement currently returns a truthy object/function, or false. This patch aims to correct this behaviour by casting the result of the isElement expression to a boolean value via double-negation. Closes angular#4519
|
CLA signed previously as Caitlin Potter |
|
@caitp - Is this change really necessary? I mean if you really want to test for equality you can do But I would expect that the vast majority of the time you would be doing Especially if you know that someBooleanValue really is definitely a boolean. |
|
@petebacondarwin I tend to agree, it's really just for @gabejohnson and others who want to use the |
|
Js non-strict equality is a unpopular practice, because it tends to lie.
|
angular.isElement currently returns a truthy object/function, or false. This patch aims to correct this behaviour by casting the result of the isElement expression to a boolean value via double-negation. Closes angular#4519 Closes angular#4534
angular.isElement currently returns a truthy object/function, or false. This patch aims to correct this behaviour by casting the result of the isElement expression to a boolean value via double-negation. Closes angular#4519 Closes angular#4534
angular.isElement currently returns a truthy object/function, or false. This
patch aims to correct this behaviour by casting the result of the isElement
expression to a boolean value via double-negation.
Closes #4519