From f1fd6795b4b65b256689907a9f7d7c1e3182cddc Mon Sep 17 00:00:00 2001 From: "jband%netscape.com" Date: Thu, 2 Sep 1999 00:11:16 +0000 Subject: [PATCH] modernizing the undefined test in println --- js/src/xpconnect/tests/xpctest_ids.js | 2 +- js/src/xpconnect/tests/xpctest_primitives.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/xpconnect/tests/xpctest_ids.js b/js/src/xpconnect/tests/xpctest_ids.js index db1b449ceaf9..201b128402d2 100644 --- a/js/src/xpconnect/tests/xpctest_ids.js +++ b/js/src/xpconnect/tests/xpctest_ids.js @@ -21,7 +21,7 @@ // our standard print function function println(s) { - if(typeof(this.document) == "undefined") + if(this.document === undefined) print(s); else dump(s+"\n"); diff --git a/js/src/xpconnect/tests/xpctest_primitives.js b/js/src/xpconnect/tests/xpctest_primitives.js index 7b5794175f01..4e26f6c3c9a4 100644 --- a/js/src/xpconnect/tests/xpctest_primitives.js +++ b/js/src/xpconnect/tests/xpctest_primitives.js @@ -51,7 +51,7 @@ var data = [ function println(s) { - if(typeof(this.document) == "undefined") + if(this.document === undefined) print(s); else dump(s+"\n");