diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 9bde98387b..7fdb7e483a 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -7,5 +7,5 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - run: npm install && npm install -g @lhci/cli@0.4.x - - run: ESBUILD=1 npm run site + - run: npm run site - run: lhci autorun --upload.target=temporary-public-storage diff --git a/components/radio/__tests__/__snapshots__/demo.test.js.snap b/components/radio/__tests__/__snapshots__/demo.test.js.snap index 0e39eec99f..3aa3dbe8a9 100644 --- a/components/radio/__tests__/__snapshots__/demo.test.js.snap +++ b/components/radio/__tests__/__snapshots__/demo.test.js.snap @@ -417,7 +417,6 @@ Array [ Disabled , -
, , +
, diff --git a/package.json b/package.json index f468b05553..53c29e7260 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "pretty-quick": "pretty-quick", "pub": "npm run version && antd-tools run pub", "prepublishOnly": "antd-tools run guard", - "site": "cross-env NODE_ICU_DATA=node_modules/full-icu concurrently \"bisheng build --ssr -c ./site/bisheng.config.js\" \"npm run color-less\"", + "site": "cross-env NODE_ICU_DATA=node_modules/full-icu ESBUILD=1 concurrently \"bisheng build --ssr -c ./site/bisheng.config.js\" \"npm run color-less\"", "sort": "npx sort-package-json", "sort-api": "antd-tools run sort-api-table", "start": "antd-tools run clean && cross-env NODE_ENV=development concurrently \"npm run color-less\" \"bisheng start -c ./site/bisheng.config.js\"", diff --git a/site/theme/template/Content/MainContent.jsx b/site/theme/template/Content/MainContent.jsx index dd38131d71..ef5b75f175 100644 --- a/site/theme/template/Content/MainContent.jsx +++ b/site/theme/template/Content/MainContent.jsx @@ -108,7 +108,9 @@ class MainContent extends Component { } componentWillUnmount() { - this.scroller.destroy(); + if (this.scroller) { + this.scroller.destroy(); + } window.removeEventListener('load', this.handleInitialHashOnLoad); window.removeEventListener('hashchange', this.handleHashChange); clearTimeout(this.timeout);