Skip to content

Commit

Permalink
Check for config via NOT
Browse files Browse the repository at this point in the history
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
maxrabin committed Oct 30, 2012
1 parent 0ba42d1 commit 16a40ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -16,7 +16,7 @@
*
*/
function test(title, f, options) {
if (options === null) {
if (!options) {
options = {
logTree: true
};
Expand Down

0 comments on commit 16a40ec

Please sign in to comment.