Fix, model builder setter will not try to cast value if already the proper type

This commit is contained in:
Aurelien Chivot 2014-02-26 21:10:15 +01:00
parent 4765fbed62
commit dfe1ea1655
1 changed files with 1 additions and 1 deletions

View File

@ -380,7 +380,7 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett
} else {
// Assume the type constructor handles Constructor() call
// If not, we should call new DataType(value).valueOf();
this.__data[propertyName] = DataType(value);
this.__data[propertyName] = (value instanceof DataType) ? value : DataType(value);
}
}
}