Guard self-serve active wash restore after unmount
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user