Merge pull request #78 from pandaiolo/master
Fix, model builder setter will not try to cast value if already the proper type
This commit is contained in:
commit
925402fdb6
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue