修复bug

This commit is contained in:
smallchill 2019-02-18 09:34:27 +08:00
parent dcc92e373a
commit 26de04cc99

View File

@ -25,15 +25,17 @@ function ergodicRoutes(routes, authKey, authority) {
}
export function patchRoutes(routes) {
Object.keys(authRoutes).map(authKey =>
ergodicRoutes(routes, authKey, authRoutes[authKey].authority)
);
window.g_routes = routes;
if (authRoutes !== null && authRoutes !== undefined) {
Object.keys(authRoutes).map(authKey =>
ergodicRoutes(routes, authKey, authRoutes[authKey].authority)
);
window.g_routes = routes;
}
}
export function render(oldRender) {
routesAuthority().then(response => {
if (response) {
if (response && response.success) {
authRoutes = response.data;
}
oldRender();