Don't fire navguard on subroute

This commit is contained in:
rijkvanzanten
2021-06-24 18:11:39 -04:00
parent 6dd839feb0
commit b1f13a0a1a

View File

@@ -255,7 +255,7 @@ export default defineComponent({
const leaveTo = ref<string | null>(null);
const editsGuard: NavigationGuard = (to) => {
if (editMode.value) {
if (editMode.value && to.params.primaryKey !== props.primaryKey) {
confirmLeave.value = true;
leaveTo.value = to.fullPath;
return false;