diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index cfdfa2774c8a9529b7017a28f2e7805b23ed799d..a0ca22864cdbd878e8582330e82ebb249995ecf8 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -134,10 +134,10 @@ export default class BasicLayout extends React.PureComponent { let title = 'Ant Design Pro'; let currRouterData = null; // match params path - for (key in Object.keys(routerData)) { + for (const key in Object.keys(routerData)) { if (pathToRegexp(key).test(pathname)) { currRouterData = routerData[key]; - break + break; } } if (currRouterData && currRouterData.name) {