Guard self-serve active wash restore after unmount

This commit is contained in:
Jeppe Bundgaard
2026-06-11 18:04:42 +02:00
parent 5a0fc5f36b
commit f8b7bda74a
@@ -1369,7 +1369,7 @@ const applyServerActiveWash = async (activeWash: any) => {
};
const restoreServerActiveWash = async () => {
if (isRestoringServerActiveWash.value) {
if (isMyWashStartUnmounted.value || isRestoringServerActiveWash.value) {
return;
}
@@ -1385,6 +1385,10 @@ const restoreServerActiveWash = async () => {
isRestoringServerActiveWash.value = true;
try {
const activeWash = await fetchServerActiveWash();
if (isMyWashStartUnmounted.value) {
return;
}
if (activeWash) {
shouldRestoreServerActiveWash.value = false;
await applyServerActiveWash(activeWash);