diff options
| author | Jacob Thornton <[email protected]> | 2012-03-21 23:59:27 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-03-21 23:59:27 -0700 |
| commit | b3bf223617754e658eb62ef0f068732e719a2c82 (patch) | |
| tree | dec00591263527c896aade8283c0a28d375809e5 | |
| parent | 20e085723b3f55fdc1db7f1687d535af7d127319 (diff) | |
| download | bootstrap-b3bf223617754e658eb62ef0f068732e719a2c82.tar.xz bootstrap-b3bf223617754e658eb62ef0f068732e719a2c82.zip | |
filter out non matches in map
| -rw-r--r-- | docs/assets/bootstrap.zip | bin | 55979 -> 55986 bytes | |||
| -rw-r--r-- | docs/assets/js/bootstrap-scrollspy.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-scrollspy.js | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip Binary files differindex 72d0da006..abd205cd1 100644 --- a/docs/assets/bootstrap.zip +++ b/docs/assets/bootstrap.zip diff --git a/docs/assets/js/bootstrap-scrollspy.js b/docs/assets/js/bootstrap-scrollspy.js index 487e6818b..bd3f10604 100644 --- a/docs/assets/js/bootstrap-scrollspy.js +++ b/docs/assets/js/bootstrap-scrollspy.js @@ -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 () { diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index 487e6818b..bd3f10604 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -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 () { |
