]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Make affix accept `0` as offsetTop or offsetBottom
authorsamme <samme@github.invalid>
Sat, 9 Aug 2014 17:17:26 +0000 (10:17 -0700)
committerHeinrich Fenkart <hnrch02@gmail.com>
Mon, 8 Sep 2014 23:32:42 +0000 (01:32 +0200)
Fixes #12815.
Closes #14363.

js/affix.js

index bd48fc2ca3eb73418d76dea348829a43e9c3febb..b8519ecb3476699e6fa93665968fbab7b1344d85 100644 (file)
 
       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)
     })