A platform for community discussion. Free, open, simple.
fix the build
Joe98354bd34c7a
diff --git a/app/assets/javascripts/discourse/components/topic-progress.js.es6 b/app/assets/javascripts/discourse/components/topic-progress.js.es6index 5705b73328e..a8370c06835 100644--- a/app/assets/javascripts/discourse/components/topic-progress.js.es6+++ b/app/assets/javascripts/discourse/components/topic-progress.js.es6@@ -180,24 +180,22 @@ export default Ember.Component.extend({}// switch mobile scroll logo at the very bottom of topics-- // not a mobile device so don't do anything- if (!this.site.mobileView) return;-- const isIOS = this.capabilities.isIOS,- switchHeight = bodyHeight - offset - windowHeight,- appEvents = getOwner(this).lookup("app-events:main");-- if (isIOS && switchHeight < -10) {- // match elastic-scroll behaviour in iOS- setTimeout(function() {- appEvents.trigger("header:hide-topic");- }, 300);- } else if (!isIOS && switchHeight < 5) {- // normal switch for everyone else- setTimeout(function() {- appEvents.trigger("header:hide-topic");- }, 300);+ if (this.site.mobileView) {+ const isIOS = this.capabilities.isIOS,+ switchHeight = bodyHeight - offset - windowHeight,+ appEvents = getOwner(this).lookup("app-events:main");++ if (isIOS && switchHeight < -10) {+ // match elastic-scroll behaviour in iOS+ setTimeout(function() {+ appEvents.trigger("header:hide-topic");+ }, 300);+ } else if (!isIOS && switchHeight < 5) {+ // normal switch for everyone else+ setTimeout(function() {+ appEvents.trigger("header:hide-topic");+ }, 300);+ }}},