Skip to content

Commit 942f829

Browse files
committed
fix: fix
1 parent 2e696ad commit 942f829

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/plugin-qiankun/src/master/masterRuntimePlugin.ts.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ function patchMicroAppRouteComponent(routes: IRouteProps[]) {
5454
const { routeBindingAlias, base, masterHistoryType } = getMasterOptions() as MasterOptions;
5555
const microAppAttachedRoutes = microAppRuntimeRoutes.filter(r => !r.insert);
5656
microAppAttachedRoutes.reverse().forEach(microAppRoute => {
57-
patchMicroAppRoute(microAppRoute, getMicroAppRouteComponent, { base, masterHistoryType, routeBindingAlias });
57+
const patchRoute = (route: IRouteProps) => {
58+
patchMicroAppRoute(route, getMicroAppRouteComponent, { base, masterHistoryType, routeBindingAlias });
59+
if (route.routes?.length) {
60+
route.routes.forEach(patchRoute);
61+
}
62+
};
63+
64+
patchRoute(microAppRoute);
5865
rootRoutes.unshift(microAppRoute);
5966
});
6067
}

0 commit comments

Comments
 (0)