diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index b9186db00d..001f7f56c4 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -140,6 +140,7 @@ const ScrollSpy = (($) => { targetSelector ] } + return null }) .filter((item) => item) .sort((a, b) => a[0] - b[0]) diff --git a/js/src/util.js b/js/src/util.js index 070c5ea757..b779c448f4 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -42,6 +42,7 @@ const Util = (($) => { if ($(event.target).is(this)) { return event.handleObj.handler.apply(this, arguments) } + return undefined } } }