Unset app ID from builder store when unmounting to prevent stale app ID header

This commit is contained in:
Andrew Kingston 2022-05-10 18:43:34 +01:00
parent 0f84d35c32
commit c7f4978d05
1 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,7 @@
import { API } from "api" import { API } from "api"
import { isActive, goto, layout, redirect } from "@roxi/routify" import { isActive, goto, layout, redirect } from "@roxi/routify"
import { capitalise } from "helpers" import { capitalise } from "helpers"
import { onMount } from "svelte" import { onMount, onDestroy } from "svelte"
export let application export let application
@ -66,6 +66,13 @@
hasSynced = true hasSynced = true
} }
}) })
onDestroy(() => {
store.update(state => {
state.appId = null
return state
})
})
</script> </script>
{#await promise} {#await promise}