diff --git a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.svelte b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.svelte index 986bd971e..ae2fc7b14 100644 --- a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/+page.svelte @@ -58,15 +58,11 @@ {:else} - {@const activeDeployment = data.activeDeployment} + {@const activeDeployment = data?.activeDeployment} - {#if data?.activeDeployment && !$func.live && showAlert} - {#if data.deploymentList.deployments[0]?.status !== 'failed' && data.deploymentList.deployments[0]?.status !== 'ready'} - (showAlert = false)}> - Some configuration changes are not live yet. Your function is currently - redeploying, and changes will be applied once the build is complete. - - {:else} + {#if activeDeployment && !$func.live && showAlert} + {@const latestDeployment = data.deploymentList.deployments[0]} + {#if latestDeployment?.status === 'failed' || latestDeployment?.status === 'ready'} (showAlert = false)}> Some configuration options are not live yet. Redeploy your function to apply latest changes. @@ -74,13 +70,18 @@ + {:else} + (showAlert = false)}> + Some configuration changes are not live yet. Your function is currently + redeploying, and changes will be applied once the build is complete. + {/if} {/if} diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.svelte index e39abae0f..bb9f070a9 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/+page.svelte @@ -77,12 +77,8 @@ {#if data?.activeDeployment && !data.site.live && showAlert} - {#if data.deploymentList.deployments[0]?.status !== 'failed' && data.deploymentList.deployments[0]?.status !== 'ready'} - (showAlert = false)}> - Some configuration changes are not live yet. Your site is currently redeploying, - and changes will be applied once the build is complete. - - {:else} + {@const latestDeployment = data.deploymentList.deployments[0]} + {#if latestDeployment?.status === 'failed' || latestDeployment?.status === 'ready'} (showAlert = false)}> Some configuration changes are not live yet. Redeploy your site to apply latest changes. @@ -97,6 +93,11 @@ + {:else} + (showAlert = false)}> + Some configuration changes are not live yet. Your site is currently redeploying, + and changes will be applied once the build is complete. + {/if} {/if}