Skip to content

definedundefined does not cover typeof checks #232

@tilmanschweitzer

Description

@tilmanschweitzer

Check undefined with typeof is a common pattern (as undefined could be overwritten in older browsers) and the angular.isUndefined implementation itself uses it (https://github.com/angular/angular.js/blob/master/src/Angular.js#L478).

Therefore these checks should be disallowed as well.

typeof variable == "undefined"
typeof variable !== "undefined"

Metadata

Metadata

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions