From da3597fb7287a988c86a8b4dde05b5a85dddfc88 Mon Sep 17 00:00:00 2001 From: Nandor Kraszlan Date: Thu, 9 Dec 2021 15:22:44 +0000 Subject: [PATCH] fix(model): added missing deep clones --- src/Calliope/Model.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Calliope/Model.ts b/src/Calliope/Model.ts index 32d0a8d6..fd23ac9d 100644 --- a/src/Calliope/Model.ts +++ b/src/Calliope/Model.ts @@ -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;