]> 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)
committerGitHub <noreply@github.com>
Mon, 4 May 2020 16:43:50 +0000 (19:43 +0300)
js/src/scrollspy.js

index 0bcd80e3eeb88ea4f98627b0fa91cff49044dfdf..96dd8303ecf96ca3a7922321118a77ad337f592e 100644 (file)
@@ -229,8 +229,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' ||