Fix off-by-one error in anchor blurring logic

This commit is contained in:
squidfunk 2016-12-24 07:24:42 +01:00
parent 7702904526
commit 13b55fa165

View File

@ -74,7 +74,7 @@ export default class Blur {
/* Scroll direction is up */ /* Scroll direction is up */
} else { } else {
for (let i = this.index_; i >= 0; i--) { for (let i = this.index_; i > 0; i--) {
if (this.anchors_[i].offsetTop > offset) { if (this.anchors_[i].offsetTop > offset) {
if (i > 0) if (i > 0)
delete this.els_[i - 1].dataset.mdState delete this.els_[i - 1].dataset.mdState