From 2f1c4631c357cd99a7f795ceb75fd52e353b49d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 4 Feb 2019 22:09:43 +0800 Subject: [PATCH] style: prettier SiderMenu.js (#3501) * style: prettier SiderMenu.js * new config file --- azure-pipelines.yml | 16 ++++++++++------ src/components/SiderMenu/SiderMenu.js | 5 +---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9a2c15c6..05f40567 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,10 +5,7 @@ name: ant design pro trigger: - batch: true - branches: - exclude: - - gh-pages + - master jobs: - job: lintAndBuild @@ -18,13 +15,14 @@ jobs: steps: - checkout: self - fetchDepth: 1 clean: false - script: yarn install displayName: install - script: npm run lint displayName: lint - script: npm run build + env: + PROGRESS: none displayName: build - job: test @@ -42,6 +40,8 @@ jobs: - script: yarn install displayName: install - script: npm run test:all + env: + PROGRESS: none displayName: test - job: Windows @@ -59,6 +59,8 @@ jobs: - script: npm run lint displayName: lint - script: npm run build + env: + PROGRESS: none displayName: build - job: MacOS @@ -75,5 +77,7 @@ jobs: displayName: install - script: npm run lint displayName: lint - - script: npm run build + - script: npm run + env: + PROGRESS: none displayName: build diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js index aafd8c06..17f41526 100644 --- a/src/components/SiderMenu/SiderMenu.js +++ b/src/components/SiderMenu/SiderMenu.js @@ -25,10 +25,7 @@ export default class SiderMenu extends PureComponent { static getDerivedStateFromProps(props, state) { const { pathname, flatMenuKeysLen } = state; - if ( - props.location.pathname !== pathname || - props.flatMenuKeys.length !== flatMenuKeysLen - ) { + if (props.location.pathname !== pathname || props.flatMenuKeys.length !== flatMenuKeysLen) { return { pathname: props.location.pathname, flatMenuKeysLen: props.flatMenuKeys.length, -- GitLab