fix structuredclone
This commit is contained in:
@@ -253,14 +253,14 @@
|
||||
{#if subMenu === 0}
|
||||
{#each builtComponentTrees as component, i}
|
||||
<button class="p-2 border border-black rounded" onclick={() => {
|
||||
addContainerToTree(structuredClone(component), selectedContatiner)
|
||||
addContainerToTree(safeStructuredClone(component), selectedContatiner)
|
||||
renderMainTree(tree)
|
||||
}}>{component.type}</button>
|
||||
{/each}
|
||||
{:else if subMenu === 1}
|
||||
{#each builtContainerTrees as container, i}
|
||||
<button class="p-2 border border-black rounded" onclick={() => {
|
||||
addContainerToTree(structuredClone(container), selectedContatiner)
|
||||
addContainerToTree(safeStructuredClone(container), selectedContatiner)
|
||||
renderMainTree(tree)
|
||||
}}>{container.type}</button>
|
||||
{/each}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<div class="flex mt-2 items-center">
|
||||
<button class="text-textcolor2 hover:text-green-500 cursor-pointer mr-1" onclick={() => {
|
||||
let botPresets = DBState.db.botPresets
|
||||
let newPreset = structuredClone(prebuiltPresets.OAI2)
|
||||
let newPreset = safeStructuredClone(prebuiltPresets.OAI2)
|
||||
newPreset.name = `New Preset`
|
||||
botPresets.push(newPreset)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user