diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-05-04 19:43:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 19:43:50 +0300 |
commit | 727e09b6410fdedf23b60e42e8ef18322244fc8b (patch) | |
tree | a2f82903ed036e3394627152dcf3f9ce97a524dd /js/src/scrollspy.js | |
parent | 37f2c04c5f05a9eb1c26e615c4edf12b8a0fa5f9 (diff) |
scrollspy.js: remove temporary variable (#30724)
Diffstat (limited to 'js/src/scrollspy.js')
-rw-r--r-- | js/src/scrollspy.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 0bcd80e3ee..96dd8303ec 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -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' || |