From 1a2163452aa90b9899f49b670eedd34e98741575 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahallawy Date: Sun, 3 Jul 2016 01:57:32 -0700 Subject: [PATCH] Fix sentry bug (#373) * Fix sentry bug * no build --- package.json | 1 - src/components/LazyLoad/index.js | 6 ++++++ src/containers/Surah/index.js | 3 +-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 44993ad3f..f2dabac83 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "dev": "node webpack/dev-server.js & PORT=8000 node start.js", "start": "NODE_PATH=\"./src\" node ./start", "build": "node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js", - "postinstall": "npm run build", "validate": "npm ls", "analyze:build": "env NODE_ENV=production ./node_modules/webpack/bin/webpack.js --json --config webpack/prod.config.js > bundle-stats.json", "analyze:json": "webpack-bundle-size-analyzer bundle-stats.json" diff --git a/src/components/LazyLoad/index.js b/src/components/LazyLoad/index.js index 43668bf4e..7d2731fd6 100644 --- a/src/components/LazyLoad/index.js +++ b/src/components/LazyLoad/index.js @@ -27,6 +27,12 @@ export default class LazyLoad extends Component { } } + componentWillUnmount() { + if (__CLIENT__) { + window.removeEventListener('scroll', this.onScroll, true); + } + } + onScroll = () => { const { isLoading, isEnd, offset, onLazyLoad } = this.props; const dom = ReactDOM.findDOMNode(this); diff --git a/src/containers/Surah/index.js b/src/containers/Surah/index.js index c547ea877..bdfd292b6 100644 --- a/src/containers/Surah/index.js +++ b/src/containers/Surah/index.js @@ -397,8 +397,7 @@ export default class Surah extends Component { />
  • |
  • -
  • - +