wolyshaw пре 4 година
родитељ
комит
afc09b0651
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/permission.js

+ 2 - 1
src/permission.js

@@ -16,7 +16,7 @@ let isOpen = false
 router.onError((error) => {
   if (error instanceof Error) {
     const isChunkLoadFailed = error.name.indexOf('chunk')
-    // const targetPath = router.history.pending.fullPath;
+    const targetPath = router.history.pending.fullPath;
     if (isChunkLoadFailed && !isOpen) {
       isOpen = true
       // console.log(router.app.$confirm)
@@ -28,6 +28,7 @@ router.onError((error) => {
       })
         .then(() => {
           // router.replace(targetPath);
+          location.hash = targetPath
           window.location.reload()
         })
         .catch(() => {