Add optional chaining as binding context may not exist

This commit is contained in:
Andrew Kingston 2023-07-24 16:19:08 +01:00
parent 02c538c315
commit 48d15f5e08
1 changed files with 2 additions and 2 deletions

View File

@ -339,7 +339,7 @@
</Tab>
{/if}
<div class="drawer-actions">
{#if typeof drawerActions.hide === "function" && drawerActions.headless}
{#if typeof drawerActions?.hide === "function" && drawerActions?.headless}
<Button
secondary
quiet
@ -350,7 +350,7 @@
Cancel
</Button>
{/if}
{#if typeof bindingDrawerActions?.save === "function" && drawerActions.headless}
{#if typeof bindingDrawerActions?.save === "function" && drawerActions?.headless}
<Button
cta
disabled={!valid}