Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Dec 8, 2024
1 parent 1f27adf commit 7a3ce57
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/snippets/js/s/complex-object-attributes-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class Author extends Model {
}

constructor(data) {
super();
super(data);
this.id = data.id;
this.name = data.name;
this.surname = data.surname;
Expand Down Expand Up @@ -99,7 +99,7 @@ import Model from '#src/core/model.js';
export default class Post extends Model {
// ...
constructor(data) {
super();
super(data);
this.id = data.id;
this.title = data.title;
this.content = data.content;
Expand Down Expand Up @@ -154,7 +154,7 @@ import Model from '#src/core/model.js';
export default class Post extends Model {
// ...
constructor(data) {
super();
super(data);
this.id = data.id;
this.title = data.title;
this.content = data.content;
Expand Down Expand Up @@ -332,7 +332,7 @@ export default class Model {
const modelName = this.constructor.name;

Model.instances[modelName].push(this);
Model.indexedInstances[modelName].set(data[index], this);
Model.indexedInstances[modelName].set(data.id, this);
}

static find(id) {
Expand Down Expand Up @@ -386,7 +386,7 @@ export default class Model {

// Store the instance in the instances and indexedInstances
Model.instances[modelName].push(this);
Model.indexedInstances[modelName].set(data[index], this);
Model.indexedInstances[modelName].set(data.id, this);
}

static get all() {
Expand Down Expand Up @@ -458,7 +458,7 @@ export default class Post extends Model {
}

constructor(data) {
super();
super(data);
this.id = data.id;
this.title = data.title;
this.content = data.content;
Expand Down Expand Up @@ -487,7 +487,7 @@ export default class Author extends Model {
}

constructor(data) {
super();
super(data);
this.id = data.id;
this.name = data.name;
this.surname = data.surname;
Expand Down

0 comments on commit 7a3ce57

Please sign in to comment.