From 92e5667b8176b935a786c0749955d040a53550cd Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 3 Dec 2024 18:55:06 +0000 Subject: [PATCH 1/2] prevent empty snippets being saved, don't crash for old empty snippets --- .../src/components/common/bindings/SnippetDrawer.svelte | 8 ++------ .../components/common/bindings/SnippetSidePanel.svelte | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/common/bindings/SnippetDrawer.svelte b/packages/builder/src/components/common/bindings/SnippetDrawer.svelte index d6b6f92b17..d8e56b059a 100644 --- a/packages/builder/src/components/common/bindings/SnippetDrawer.svelte +++ b/packages/builder/src/components/common/bindings/SnippetDrawer.svelte @@ -63,7 +63,7 @@ if (!name?.length) { return "Name is required" } - if (snippets.some(snippet => snippet.name === name)) { + if (!snippet?.name && snippets.some(snippet => snippet.name === name)) { return "That name is already in use" } if (firstCharNumberRegex.test(name)) { @@ -106,11 +106,7 @@ Delete {/if} - diff --git a/packages/builder/src/components/common/bindings/SnippetSidePanel.svelte b/packages/builder/src/components/common/bindings/SnippetSidePanel.svelte index c68699fc0f..2cc27b91cd 100644 --- a/packages/builder/src/components/common/bindings/SnippetSidePanel.svelte +++ b/packages/builder/src/components/common/bindings/SnippetSidePanel.svelte @@ -186,7 +186,7 @@
{#key hoveredSnippet} From 82a1165077d259f39847eadbeab6f66b9f6c4cd4 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 3 Dec 2024 19:01:00 +0000 Subject: [PATCH 2/2] Bump version to 3.2.23 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index e67812f37b..13bf382d84 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "3.2.22", + "version": "3.2.23", "npmClient": "yarn", "concurrency": 20, "command": {