don't assume the api will be there
parent
4ed175d54a
commit
2b02fc1506
|
@ -27,7 +27,7 @@
|
|||
|
||||
const api = getContext("api");
|
||||
|
||||
$: api.dispatch.setNbrArmorLayers(nbr_layers);
|
||||
$: api?.dispatch.setNbrArmorLayers(nbr_layers);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
const api = getContext("api");
|
||||
|
||||
$: api.dispatch?.setHull?.(rating);
|
||||
$: api?.dispatch?.setHull?.(rating);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
const api = getContext("api");
|
||||
|
||||
$: api.dispatch?.setScreens?.({ standard, advanced });
|
||||
$: api?.dispatch?.setScreens?.({ standard, advanced });
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
Loading…
Reference in New Issue