1
0
Fork 0

Moved named class argument check error to a more sensible location and amended error message

closure/master
Mike Gerwitz 2011-03-04 23:44:19 -05:00
parent 0ccdf07145
commit bedc3c95af
1 changed files with 4 additions and 4 deletions

View File

@ -259,17 +259,17 @@ function createNamedClass( name, def )
);
}
// add the name to the definition
def.__name = name;
// the definition must be an object
if ( typeof def !== 'object' )
{
throw TypeError(
"Unexpected value for named class definition"
"Unexpected value for named class definition; object expected"
);
}
// add the name to the definition
def.__name = name;
return extend( def );
}