aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsamme <[email protected]>2014-08-09 10:17:26 -0700
committerHeinrich Fenkart <[email protected]>2014-09-09 01:32:42 +0200
commite29c75041e2e7bf93273528b217e410045fa563d (patch)
treecd6dd9a82dbb58ae9e1ea7dc08a3f83b25fce716
parent9b9e2f5d139e0accd141d5b4b04bb332ed341e4f (diff)
downloadbootstrap-e29c75041e2e7bf93273528b217e410045fa563d.tar.xz
bootstrap-e29c75041e2e7bf93273528b217e410045fa563d.zip
Make affix accept `0` as offsetTop or offsetBottom
Fixes #12815. Closes #14363.
-rw-r--r--js/affix.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/affix.js b/js/affix.js
index bd48fc2ca..b8519ecb3 100644
--- a/js/affix.js
+++ b/js/affix.js
@@ -152,8 +152,8 @@
data.offset = data.offset || {}
- if (data.offsetBottom) data.offset.bottom = data.offsetBottom
- if (data.offsetTop) data.offset.top = data.offsetTop
+ if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
+ if (data.offsetTop != null) data.offset.top = data.offsetTop
Plugin.call($spy, data)
})