From 8c9b5d5972c398c64f409969176d2d31f88f2f06 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Mon, 8 Feb 2021 00:13:41 +0300 Subject: [PATCH] Replace depricated addRoutes with addRoute --- src/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/permission.js b/src/permission.js index b7c82f5c..8e155e5b 100644 --- a/src/permission.js +++ b/src/permission.js @@ -28,7 +28,7 @@ export const beforeEachRoute = (to, from, next) => { store.dispatch('GetUserInfo').then(res => { const roles = res.data.pleroma.is_admin ? ['admin'] : [] store.dispatch('GenerateRoutes', { roles }).then(() => { - router.addRoutes(store.getters.addRouters) + store.getters.addRouters.forEach(route => router.addRoute(route)) next({ ...to, replace: true }) }) }).catch((err) => {