Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

There's type-free objects in Firefox, extend objectType() to allow null match. Fixes...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 1 Oct 2012 10:13:18 +0000 (12:13 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 1 Oct 2012 10:13:18 +0000 (12:13 +0200)
qunit/qunit.js

index b525bdb..a155241 100644 (file)
@@ -763,7 +763,8 @@ extend( QUnit, {
                                return "null";
                }
 
-               var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || "";
+               var match = toString.call( obj ).match(/^\[object\s(.*)\]$/),
+                       type = match && match[1] || "";
 
                switch ( type ) {
                        case "Number":

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf