From 6cadeff1f9902fe7e8e3d1e7f6807cbc142cb6b6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Aug 2018 17:38:20 +0800 Subject: [PATCH] fxi key declaration --- src/layouts/BasicLayout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index cfdfa277..a0ca2286 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) { -- GitLab