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