about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/columns_area.js
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-08-31 18:20:54 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-31 11:20:54 +0200
commit69957ed10a4b7987fd50351da89944b146952b33 (patch)
tree848bc642830b2cd06579e643fccb367c573c7e9a /app/javascript/mastodon/features/ui/components/columns_area.js
parentd1a78eba1558004f69ab8933b08ffe0093671546 (diff)
Fix the usages of Detect Passive Events (#4749)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/columns_area.js')
-rw-r--r--app/javascript/mastodon/features/ui/components/columns_area.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js
index a4c60d968..7d84bece7 100644
--- a/app/javascript/mastodon/features/ui/components/columns_area.js
+++ b/app/javascript/mastodon/features/ui/components/columns_area.js
@@ -49,7 +49,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
 
   componentDidMount() {
     if (!this.props.singleColumn) {
-      this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents ? { passive: true } : false);
+      this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents.hasSupport ? { passive: true } : false);
     }
     this.lastIndex = getIndex(this.context.router.history.location.pathname);
     this.setState({ shouldAnimate: true });
@@ -63,7 +63,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
 
   componentDidUpdate(prevProps) {
     if (this.props.singleColumn !== prevProps.singleColumn && !this.props.singleColumn) {
-      this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents ? { passive: true } : false);
+      this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents.hasSupport ? { passive: true } : false);
     }
     this.lastIndex = getIndex(this.context.router.history.location.pathname);
     this.setState({ shouldAnimate: true });