From 51b19633f4daf3742ad4c76e43162dd2f7bbdfd5 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 7 Feb 2024 10:03:37 +0000 Subject: [PATCH] Ensure insert config items are defaulted to avoid destructring issue --- .../builder/src/components/common/CodeEditor/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/CodeEditor/index.js b/packages/builder/src/components/common/CodeEditor/index.js index 38d377b47a..0d71a475f0 100644 --- a/packages/builder/src/components/common/CodeEditor/index.js +++ b/packages/builder/src/components/common/CodeEditor/index.js @@ -286,7 +286,13 @@ export const hbInsert = (value, from, to, text) => { return parsedInsert } -export function jsInsert(value, from, to, text, { helper, disableWrapping }) { +export function jsInsert( + value, + from, + to, + text, + { helper, disableWrapping } = {} +) { let parsedInsert = "" const left = from ? value.substring(0, from) : ""