Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure we use the constructor #17

Merged
merged 1 commit into from
Feb 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make sure we use the constructor
  • Loading branch information
tim-s-ccs committed Feb 7, 2022
commit 1d14b74c79cfa3ba2fcd30fa42da5f43991c949b
2 changes: 1 addition & 1 deletion src/models/activeModel.ts
Original file line number Diff line number Diff line change
@@ -140,7 +140,7 @@ abstract class ActiveModel extends Model implements ActiveModelInterface {

if (this.data[attribute] === undefined || (this.data[attribute] as StaticModel).data.id !== id) {
// TODO: Chnage to somthing that is not any
this.data[attribute] = (attributeConstructor as any).find(id)
this.data[attribute] = (attributeConstructor.constructor as any).find(id)
}
} else {
switch(attributeConstructor.constructor) {