diff --git a/src/Model/Types/ArrayType.ts b/src/Model/Types/ArrayType.ts index 6149029..b717d9a 100644 --- a/src/Model/Types/ArrayType.ts +++ b/src/Model/Types/ArrayType.ts @@ -38,12 +38,18 @@ export class ArrayType extends Type this.valueType.serializeDiff(value)); } resetDiff(value: SharkitekValueType[]): void { + // Do nothing if it is not an array. + if (!Array.isArray(value)) return; + // Reset diff of all elements. value.forEach((value) => this.valueType.resetDiff(value)); }