Fix various type errors with strict mode

This commit is contained in:
Ryan Gossiaux
2021-12-15 14:06:33 -08:00
parent 543c1263e3
commit 5b36ce9404
9 changed files with 96 additions and 64 deletions

View File

@@ -7,7 +7,7 @@
if (event.target !== event.currentTarget) return;
event.preventDefault();
event.stopPropagation();
$api.close();
$api?.close();
}
$: propsWeControl = {
id,
@@ -16,5 +16,5 @@
</script>
<div {...{ ...$$restProps, ...propsWeControl }} on:click={handleClick}>
<slot open={$api.dialogState === DialogStates.Open} />
<slot open={$api?.dialogState === DialogStates.Open} />
</div>