FIX: iPad locking on was broken when posting.

This commit is contained in:
Robin Ward 2016-05-30 12:08:08 -04:00
parent 97c1bb9159
commit 717999b302
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D

View File

@ -59,12 +59,11 @@ export default class LockOn {
const top = this.elementTop();
const scrollTop = $(window).scrollTop();
if (typeof(top) === "undefined") {
if (typeof(top) === "undefined" || isNaN(top)) {
return this.clearLock(interval);
}
if (!within(4, top, previousTop) || !within(4, scrollTop, top)) {
console.log(top, previousTop, scrollTop);
$(window).scrollTop(top);
previousTop = top;
}