diff --git a/public/res/extensions/scrollLink.js b/public/res/extensions/scrollLink.js index 39921196..cb9e25b3 100644 --- a/public/res/extensions/scrollLink.js +++ b/public/res/extensions/scrollLink.js @@ -106,7 +106,7 @@ define([ // Something wrong in the algorithm... return; } - var posInSection = (srcScrollTop - srcSection.startOffset) / srcSection.height; + var posInSection = (srcScrollTop - srcSection.startOffset) / (srcSection.height || 1); var destSection = destSectionList[sectionIndex]; return destSection.startOffset + destSection.height * posInSection; }