From 13b55fa1658814ef42e3648a8961528296670e57 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 24 Dec 2016 07:24:42 +0100 Subject: [PATCH] Fix off-by-one error in anchor blurring logic --- src/assets/javascripts/components/Material/Nav/Blur.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/javascripts/components/Material/Nav/Blur.js b/src/assets/javascripts/components/Material/Nav/Blur.js index 7c70729dd..33dd6931c 100644 --- a/src/assets/javascripts/components/Material/Nav/Blur.js +++ b/src/assets/javascripts/components/Material/Nav/Blur.js @@ -74,7 +74,7 @@ export default class Blur { /* Scroll direction is up */ } else { - for (let i = this.index_; i >= 0; i--) { + for (let i = this.index_; i > 0; i--) { if (this.anchors_[i].offsetTop > offset) { if (i > 0) delete this.els_[i - 1].dataset.mdState