mirror of
https://github.com/directus/directus.git
synced 2026-01-24 19:18:07 -05:00
Use hasEdits computed inside navigation guard
This commit is contained in:
@@ -324,9 +324,7 @@ export default defineComponent({
|
||||
useShortcut('meta+shift+s', saveAndAddNew, form);
|
||||
|
||||
const navigationGuard: NavigationGuard = (to, from, next) => {
|
||||
const hasEdits = Object.keys(edits.value).length > 0;
|
||||
|
||||
if (hasEdits) {
|
||||
if (hasEdits.value) {
|
||||
confirmLeave.value = true;
|
||||
leaveTo.value = to.fullPath;
|
||||
return next(false);
|
||||
|
||||
Reference in New Issue
Block a user