Skip to content

Commit

Permalink
Fixed findClassNames in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Dec 7, 2010
1 parent 5b2f679 commit 5577d0e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frameworks/runtime/system/object.js
Expand Up @@ -803,8 +803,14 @@ function findClassNames() {
var path = (root) ? [root,key].join('.') : key ;
var value = object[key] ;

try {
var type = SC.typeOf(value);
} catch (e) {
// Firefox gives security errors when trying to run typeOf on certain objects
break;
}

switch(SC.typeOf(value)) {
switch(type) {
case SC.T_CLASS:
if (!value._object_className) value._object_className = path;
if (levels>=0) searchObject(path, value, levels) ;
Expand Down

0 comments on commit 5577d0e

Please sign in to comment.