diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte index 4dac5f427..db5149a6a 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte @@ -24,20 +24,17 @@ const sdkCreateVariable = async (key: string, value: string) => { await sdk.forProject.functions.createVariable($func.$id, key, value); - await invalidate(Dependencies.VARIABLES); - await invalidate(Dependencies.FUNCTION); + await Promise.all([invalidate(Dependencies.VARIABLES), invalidate(Dependencies.FUNCTION)]); }; const sdkUpdateVariable = async (variableId: string, key: string, value: string) => { await sdk.forProject.functions.updateVariable($func.$id, variableId, key, value); - await invalidate(Dependencies.VARIABLES); - await invalidate(Dependencies.FUNCTION); + await Promise.all([invalidate(Dependencies.VARIABLES), invalidate(Dependencies.FUNCTION)]); }; const sdkDeleteVariable = async (variableId: string) => { await sdk.forProject.functions.deleteVariable($func.$id, variableId); - await invalidate(Dependencies.VARIABLES); - await invalidate(Dependencies.FUNCTION); + await Promise.all([invalidate(Dependencies.VARIABLES), invalidate(Dependencies.FUNCTION)]); }; diff --git a/src/routes/console/project-[project]/updateVariables.svelte b/src/routes/console/project-[project]/updateVariables.svelte index 8a17fa61d..7396219fa 100644 --- a/src/routes/console/project-[project]/updateVariables.svelte +++ b/src/routes/console/project-[project]/updateVariables.svelte @@ -138,9 +138,11 @@ selectedVar = null; showPromoteModal = false; - await invalidate(Dependencies.FUNCTION); - await invalidate(Dependencies.VARIABLES); - await invalidate(Dependencies.PROJECT_VARIABLES); + await Promise.all([ + invalidate(Dependencies.FUNCTION), + invalidate(Dependencies.VARIABLES), + invalidate(Dependencies.PROJECT_VARIABLES) + ]); addNotification({ type: 'success',