From 8aae29d7143e6b2ad9cbb26d27410922bab18936 Mon Sep 17 00:00:00 2001 From: Siklos Date: Thu, 8 Sep 2022 13:13:13 +0200 Subject: [PATCH] Fix ApplyAddMethod when method is null --- src/Components/Editor/Actions/ContainerOperations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/Editor/Actions/ContainerOperations.ts b/src/Components/Editor/Actions/ContainerOperations.ts index d0dc7e4..4a05dfa 100644 --- a/src/Components/Editor/Actions/ContainerOperations.ts +++ b/src/Components/Editor/Actions/ContainerOperations.ts @@ -461,7 +461,9 @@ function ApplyAddMethod( ): number { if (index > 0 && ( containerConfig.AddMethod === undefined || - containerConfig.AddMethod === AddMethod.Append)) { + containerConfig.AddMethod === null || + containerConfig.AddMethod === AddMethod.Append + )) { // Append method (default) const lastChild: IContainerModel | undefined = parent.children .at(index - 1);