]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
filter out non matches in map
authorJacob Thornton <jacobthornton@gmail.com>
Thu, 22 Mar 2012 06:59:27 +0000 (23:59 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Thu, 22 Mar 2012 06:59:27 +0000 (23:59 -0700)
docs/assets/bootstrap.zip
docs/assets/js/bootstrap-scrollspy.js
js/bootstrap-scrollspy.js

index 72d0da00655f40c2578cbfef621c069c6e03e2f9..abd205cd1d5ab4301e1aa28325bfcf590aa13e3e 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index 487e6818b1847999e9c283cebd65181f0cbe5d03..bd3f106044f46e1eeb005f41615bc9b2ae31757e 100644 (file)
@@ -54,9 +54,9 @@
           .map(function () {
             var href = $(this).attr('href')
               , $href = /^#\w/.test(href) && $(href)
-            return $href
+            return $href
               && href.length
-              && [[ $href.position().top, href ]]
+              && [[ $href.position().top, href ]] ) || null
           })
           .sort(function (a, b) { return a[0] - b[0] })
           .each(function () {
index 487e6818b1847999e9c283cebd65181f0cbe5d03..bd3f106044f46e1eeb005f41615bc9b2ae31757e 100644 (file)
@@ -54,9 +54,9 @@
           .map(function () {
             var href = $(this).attr('href')
               , $href = /^#\w/.test(href) && $(href)
-            return $href
+            return $href
               && href.length
-              && [[ $href.position().top, href ]]
+              && [[ $href.position().top, href ]] ) || null
           })
           .sort(function (a, b) { return a[0] - b[0] })
           .each(function () {