JS client: remove "undefined" from model dependency arguments

Closes #2279
This commit is contained in:
xhh
2016-03-07 15:57:13 +08:00
parent b84694380b
commit dfe57bfd6b
22 changed files with 510 additions and 122 deletions

View File

@@ -306,7 +306,10 @@
case 'Date':
return this.parseDate(String(data));
default:
if (typeof type === 'function') {
if (type === Object) {
// generic object, return directly
return data;
} else if (typeof type === 'function') {
// for model type like: User
var model = type.constructFromObject(data);
return model;