Skip to content

Commit e676162

Browse files
committed
feat(model): apply relations on construct
1 parent f7aa7d1 commit e676162

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/Model.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default class Model extends StaticModel {
1010
this._builder = new Builder(this)
1111
} else {
1212
Object.assign(this, ...attributes)
13+
this._applyRelations(this)
1314
}
1415

1516
if (this.baseURL === undefined) {
@@ -237,8 +238,6 @@ export default class Model extends StaticModel {
237238
item._from(this._fromResource)
238239
}
239240

240-
this._applyRelations(item)
241-
242241
return item
243242
}
244243

0 commit comments

Comments
 (0)