[Dojo-checkins] kzyp - r18468 - dojox/trunk/json
dojo-checkins-admin at dojotoolkit.org
dojo-checkins-admin at dojotoolkit.org
Mon Jun 29 18:24:34 EDT 2009
Author: kzyp
Date: Mon Jun 29 15:24:33 2009
New Revision: 18468
Modified:
dojox/trunk/json/schema.js
Log:
Support primitive constructors in property definitions
Modified: dojox/trunk/json/schema.js
==============================================================================
--- dojox/trunk/json/schema.js (original)
+++ dojox/trunk/json/schema.js Mon Jun 29 15:24:33 2009
@@ -58,7 +58,7 @@
if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function')){
if(typeof schema == 'function'){
- if(!(value instanceof schema)){
+ if(!(Object(value) instanceof schema)){
addError("is not an instance of the class/constructor " + schema.name);
}
}else if(schema){
More information about the Dojo-checkins
mailing list