From 09848009c16c95fd2b25ee82fa03b895da8a450a Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 11 Feb 2019 16:10:29 +0000 Subject: [PATCH] Correct reference to 'self' variable It doesn't exist in this scope so the 'self' in the scope above was being referenced instead, preventing it from erroring. --- app/assets/javascripts/stick-to-window-when-scrolling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/stick-to-window-when-scrolling.js b/app/assets/javascripts/stick-to-window-when-scrolling.js index b3ebdef1d..5b221f1b9 100644 --- a/app/assets/javascripts/stick-to-window-when-scrolling.js +++ b/app/assets/javascripts/stick-to-window-when-scrolling.js @@ -263,7 +263,7 @@ $(window).scrollTop(this.getInPageEdgePosition(sticky) - windowHeight); } - self.hasResized = false; + this.hasResized = false; }, releaseEl: function (el, sticky) { el.$fixedEl.css(sticky.edge, '');