From 92bb2814f6675fb16e7dfe0f9fe07400e7bcccee Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 3 Feb 2014 13:55:54 +0100 Subject: [PATCH] the undefined object in JS is evil, use the typeof operator instead --- test/phantom/evaluate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phantom/evaluate.js b/test/phantom/evaluate.js index 27a2d71..ccf01e4 100644 --- a/test/phantom/evaluate.js +++ b/test/phantom/evaluate.js @@ -26,7 +26,7 @@ page.viewportSize = { // 0: silent, 1: some infos, 2: display console.log() output var debug = 2; -if (system.env['DEBUG'] != 'undefined' && parseInt(system.env['DEBUG']) != NaN) { +if (typeof system.env['DEBUG'] != 'undefined' && parseInt(system.env['DEBUG']) != NaN) { debug = system.env['DEBUG']; if (debug > 0) console.log("reset debug level to: " + debug); } -- 1.7.10.4