don't assume the api will be there

docks66-json-schema
Yanick Champoux 2023-04-14 15:09:51 -04:00
parent 4ed175d54a
commit 2b02fc1506
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@
const api = getContext("api");
$: api.dispatch.setNbrArmorLayers(nbr_layers);
$: api?.dispatch.setNbrArmorLayers(nbr_layers);
</script>
<style>

View File

@ -17,7 +17,7 @@
const api = getContext("api");
$: api.dispatch?.setHull?.(rating);
$: api?.dispatch?.setHull?.(rating);
</script>
<style>

View File

@ -23,7 +23,7 @@
const api = getContext("api");
$: api.dispatch?.setScreens?.({ standard, advanced });
$: api?.dispatch?.setScreens?.({ standard, advanced });
</script>
<style>