Skip to content

Commit da3597f

Browse files
committed
fix(model): added missing deep clones
1 parent 897e1ef commit da3597f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Calliope/Model.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export default class Model extends SoftDeletes implements HasFactory {
108108

109109
// attributes
110110
clone.original = this.getRawOriginal();
111-
clone.fillableAttributes = this.fillableAttributes;
112-
clone.guardedAttributes = this.guardedAttributes;
113-
clone.attributeCasts = this.attributeCasts;
111+
clone.fillableAttributes = cloneDeep(this.fillableAttributes);
112+
clone.guardedAttributes = cloneDeep(this.guardedAttributes);
113+
clone.attributeCasts = cloneDeep(this.attributeCasts);
114114

115115
// miscellaneous
116116
clone.hasOneOrManyParentKeyName = this.hasOneOrManyParentKeyName;

0 commit comments

Comments
 (0)