mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12: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);
|
||||
|
||||
return {
|
||||
...!isUndefined(item.toJSON) ? item.toObject() : item,
|
||||
...!isUndefined(item.toObject) ? item.toObject() : item,
|
||||
...attributes
|
||||
};
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ export default class ModelBase extends mixin(Model, [DateSession]) {
|
||||
}
|
||||
|
||||
toObject(opt) {
|
||||
const parsedJson = super.$formatJson(this, opt);
|
||||
const parsedJson = super.$toJson(opt);
|
||||
return parsedJson;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user