Fixed minor bug with Safari and the test suite.
authorJohn Resig <jeresig@gmail.com>
Tue, 3 Oct 2006 08:45:16 +0000 (08:45 +0000)
committerJohn Resig <jeresig@gmail.com>
Tue, 3 Oct 2006 08:45:16 +0000 (08:45 +0000)
build/test/data/testrunner.js

index 11921f9..0b6e08d 100644 (file)
@@ -55,7 +55,7 @@ function test(name, callback) {
                try {
                        callback();
                } catch(e) {
-                       if(typeof console != "undefined") {
+                       if( console && console.error ) {
                                console.error("Test " + name + " died, exception and test follows");
                                console.error(e);
                                console.warn(callback.toString());