mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: mode object transform.
This commit is contained in:
@@ -31,7 +31,7 @@ export class Transformer {
|
|||||||
const attributes = this.getIncludeAttributesTransformed(item);
|
const attributes = this.getIncludeAttributesTransformed(item);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...!isUndefined(item.toJSON) ? item.toObject() : item,
|
...!isUndefined(item.toObject) ? item.toObject() : item,
|
||||||
...attributes
|
...attributes
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default class ModelBase extends mixin(Model, [DateSession]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toObject(opt) {
|
toObject(opt) {
|
||||||
const parsedJson = super.$formatJson(this, opt);
|
const parsedJson = super.$toJson(opt);
|
||||||
return parsedJson;
|
return parsedJson;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user