diff --git a/src/Components/Editor/Actions/ContainerOperations.ts b/src/Components/Editor/Actions/ContainerOperations.ts index 00b5ba6..3e8525e 100644 --- a/src/Components/Editor/Actions/ContainerOperations.ts +++ b/src/Components/Editor/Actions/ContainerOperations.ts @@ -327,7 +327,7 @@ function AssignProperty(container: ContainerModel, key: string, value: string | function SetMargin(): void { // We need to detect change in order to apply transformation to the width and height // Knowing the current margin is not enough as we dont keep the original width and height - const oldMarginValue: number = (container.properties.margin as any)[key]; + const oldMarginValue: number = (container.properties.margin as any)[key] ?? 0; const diff = Number(value) - oldMarginValue; switch (key) { case 'left':