aboutsummaryrefslogtreecommitdiff
path: root/js/src/scrollspy.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/scrollspy.js')
-rw-r--r--js/src/scrollspy.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js
index e3e5e76b9..a05e57d62 100644
--- a/js/src/scrollspy.js
+++ b/js/src/scrollspy.js
@@ -196,9 +196,7 @@ class ScrollSpy extends BaseComponent {
_process() {
const scrollTop = this._getScrollTop() + this._config.offset
const scrollHeight = this._getScrollHeight()
- const maxScroll = this._config.offset +
- scrollHeight -
- this._getOffsetHeight()
+ const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()
if (this._scrollHeight !== scrollHeight) {
this.refresh()
@@ -223,8 +221,7 @@ class ScrollSpy extends BaseComponent {
for (let i = this._offsets.length; i--;) {
const isActiveTarget = this._activeTarget !== this._targets[i] &&
scrollTop >= this._offsets[i] &&
- (typeof this._offsets[i + 1] === 'undefined' ||
- scrollTop < this._offsets[i + 1])
+ (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1])
if (isActiveTarget) {
this._activate(this._targets[i])