From a8d20c623fe78120f276d261688abd1b0436fa8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 13 Aug 2015 12:42:57 +0200 Subject: [PATCH] FIX: eyeline was broken in dev --- app/assets/javascripts/discourse/lib/eyeline.js.es6 | 4 ++-- app/assets/javascripts/discourse/mixins/load-more.js.es6 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/eyeline.js.es6 b/app/assets/javascripts/discourse/lib/eyeline.js.es6 index 69edbc54bec..8d40841afdd 100644 --- a/app/assets/javascripts/discourse/lib/eyeline.js.es6 +++ b/app/assets/javascripts/discourse/lib/eyeline.js.es6 @@ -4,7 +4,7 @@ const Eyeline = function Eyeline(selector) { }; Eyeline.prototype.update = function() { - if (Ember.Test) { return; } + if (Ember.testing) { return; } const docViewTop = $(window).scrollTop(), windowHeight = $(window).height(), @@ -60,7 +60,7 @@ Eyeline.prototype.update = function() { // Call this when we know aren't loading any more elements. Mark the rest as seen Eyeline.prototype.flushRest = function() { - if (Ember.Test) { return; } + if (Ember.testing) { return; } const self = this; $(this.selector).each(function(i, elem) { return self.trigger('saw', { detail: $(elem) }); diff --git a/app/assets/javascripts/discourse/mixins/load-more.js.es6 b/app/assets/javascripts/discourse/mixins/load-more.js.es6 index 19d772a9bd3..d0e63e4ba4a 100644 --- a/app/assets/javascripts/discourse/mixins/load-more.js.es6 +++ b/app/assets/javascripts/discourse/mixins/load-more.js.es6 @@ -4,7 +4,7 @@ import Scrolling from 'discourse/mixins/scrolling'; // Provides the ability to load more items for a view which is scrolled to the bottom. export default Ember.Mixin.create(Ember.ViewTargetActionSupport, Scrolling, { - scrolled: function() { + scrolled() { const eyeline = this.get('eyeline'); if (eyeline) { eyeline.update(); } },