]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
scrollspy.js: remove temporary variable (#30724)
authorXhmikosR <xhmikosr@gmail.com>
Mon, 4 May 2020 16:43:50 +0000 (19:43 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 7 May 2020 06:31:49 +0000 (09:31 +0300)
js/src/scrollspy.js

index 9c856c4edf15577cce9c9da1489675b58471c998..2c7c8a1dc8137d1aaa51f9e758c6079f8005c16a 100644 (file)
@@ -214,8 +214,7 @@ class ScrollSpy {
       return
     }
 
-    const offsetLength = this._offsets.length
-    for (let i = offsetLength; i--;) {
+    for (let i = this._offsets.length; i--;) {
       const isActiveTarget = this._activeTarget !== this._targets[i] &&
           scrollTop >= this._offsets[i] &&
           (typeof this._offsets[i + 1] === 'undefined' ||