Permalink
Browse files

Check for config via NOT

Until yesterday, this was `if (config == null)`, which checks for a certain
falseyness of `config`. This was changed yesterday to `if (config === null)` which
checks if `config` is, in fact, `null`. The problem is that when calling a function
without a parameter, then the paramter is `undefined`. So maybe we should check
for `if (config === undefined)` but I figure its easier and clearer to check
`if (!config)`
  • Loading branch information...
1 parent 0ba42d1 commit 16a40ecfd9341ee86f6d59f045a2cfd274dbec89 @maxrabin maxrabin committed Oct 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 test.js
View
@@ -16,7 +16,7 @@
*
*/
function test(title, f, options) {
- if (options === null) {
+ if (!options) {
options = {
logTree: true
};

0 comments on commit 16a40ec

Please sign in to comment.