From 46a7f15fed6d7965e71deab92d2d95db4556f709 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 23 Oct 2024 13:19:24 +0200 Subject: [PATCH] Fix name checks --- packages/server/src/sdk/app/rowActions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/sdk/app/rowActions.ts b/packages/server/src/sdk/app/rowActions.ts index 6a0a803bd5..de73969696 100644 --- a/packages/server/src/sdk/app/rowActions.ts +++ b/packages/server/src/sdk/app/rowActions.ts @@ -19,12 +19,13 @@ async function ensureUniqueAndThrow( existingRowActionId?: string ) { const names = await getNames(doc) - name = name.toLowerCase() + name = name.toLowerCase().trim() if ( Object.entries(names).find( ([automationId, automationName]) => - automationName === name && automationId !== existingRowActionId + automationName.toLowerCase().trim() === name && + automationId !== existingRowActionId ) ) { throw new HTTPError("A row action with the same name already exists.", 409)