Ensure insert config items are defaulted to avoid destructring issue

This commit is contained in:
Dean 2024-02-07 10:03:37 +00:00
parent 2cb4e7de71
commit 51b19633f4
1 changed files with 7 additions and 1 deletions

View File

@ -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) : ""