Skip to content

Commit

Permalink
fix(model): added missing deep clones
Browse files Browse the repository at this point in the history
  • Loading branch information
nandi95 committed Dec 9, 2021
1 parent 897e1ef commit da3597f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Calliope/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export default class Model extends SoftDeletes implements HasFactory {

// attributes
clone.original = this.getRawOriginal();
clone.fillableAttributes = this.fillableAttributes;
clone.guardedAttributes = this.guardedAttributes;
clone.attributeCasts = this.attributeCasts;
clone.fillableAttributes = cloneDeep(this.fillableAttributes);
clone.guardedAttributes = cloneDeep(this.guardedAttributes);
clone.attributeCasts = cloneDeep(this.attributeCasts);

// miscellaneous
clone.hasOneOrManyParentKeyName = this.hasOneOrManyParentKeyName;
Expand Down

0 comments on commit da3597f

Please sign in to comment.