From b5839d639866329164d656696cd8e108d162293d Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Sun, 4 Dec 2022 16:20:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AF=20`?= =?UTF-8?q?CachingAsyncRoutes`=20=E5=90=8E=EF=BC=8C=E5=AD=98=E5=85=A5?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=AD=98=E5=82=A8=E7=9A=84=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=94=B9=E5=8F=98=E9=80=A0=E6=88=90=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=A1=B5=E9=9D=A2=E7=A9=BA=E7=99=BD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/utils.ts b/src/router/utils.ts index 127b7382a..7590db510 100644 --- a/src/router/utils.ts +++ b/src/router/utils.ts @@ -198,7 +198,7 @@ function initRouter() { } else { return new Promise(resolve => { getAsyncRoutes().then(({ data }) => { - handleAsyncRoutes(data); + handleAsyncRoutes(cloneDeep(data)); storageSession.setItem(key, data); resolve(router); }); @@ -207,7 +207,7 @@ function initRouter() { } else { return new Promise(resolve => { getAsyncRoutes().then(({ data }) => { - handleAsyncRoutes(data); + handleAsyncRoutes(cloneDeep(data)); resolve(router); }); });