Skip to content

Commit

Permalink
fix: mistakenly blocked routes when nothing was changed in configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-kalachikov committed Dec 17, 2024
1 parent 91f3fbc commit b1edf17
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ async function canChangeRoute(): Promise<boolean> {
if (!configurableLineItemId) {
return true;
}
return isConfigurationChanged.value && (await openSaveChangesModal());
if (!isConfigurationChanged.value) {
return true;
}
return await openSaveChangesModal();
}
onBeforeRouteLeave(canChangeRoute);
onBeforeRouteUpdate(canChangeRoute);
Expand Down

0 comments on commit b1edf17

Please sign in to comment.