Skip to content
Browse files

I think there should be typeof predefined[v] !== 'boolean' instead of…

… "predefined[v] !== 'boolean'" because predefined is a has with boolean values :)


Actually there is no need to check the type, better way is just "predefined[v] !== true"
  • Loading branch information...
1 parent d98f753 commit a1c2a4f03679888f912e4c101e2e6bb171ba3a96 @kof committed Nov 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 fulljslint.js
View
2 fulljslint.js 100755 → 100644
@@ -4096,7 +4096,7 @@ loop: for (;;) {
// then we have an undefined variable.
} else if (funct['(global)']) {
- if (option.undef && predefined[v] !== 'boolean') {
+ if (option.undef && typeof predefined[v] !== 'boolean') {
warning("'{a}' is not defined.", token, v);
}
note_implied(token);

2 comments on commit a1c2a4f

@marcelkorpel

Then you don't have to test for predefined[v] !== true, but could just use
!predefined[v]

@kof
Owner
kof commented on a1c2a4f Dec 1, 2010

yes, but it is not explicitly and conflicts with jslint ideas.

Please sign in to comment.
Something went wrong with that request. Please try again.