Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Added null/empty jQuery check & default top val #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 9, 2017

  1. Added null/empty jQuery check & default top val

    Based on this error I get when running GitBook 3.2.2:
    
    ```
    Uncaught TypeError: Cannot read property 'top' of undefined
        at a (theme.js:formatted:5276)
        at HTMLLIElement.<anonymous> (theme.js:formatted:5315)
        at Function.each (theme.js:formatted:784)
        at de.fn.init.each (theme.js:formatted:694)
        at HTMLDivElement.l (theme.js:formatted:5313)
        at HTMLDivElement.dispatch (theme.js:formatted:2468)
        at HTMLDivElement.m.handle (theme.js:formatted:2400)
    ```
    
    Accordingly, I've added
    
    # A null check to the `while` loop of `getElementTopPosition`
    # An empty jQuery element check to the `while` loop of `getElementTopPosition`
    # Sensible defaults should the call to `$el.position().top` in `getElementTopPosition` fail
    Kyle Kellogg committed Jun 9, 2017
    Configuration menu
    Copy the full SHA
    eea3df7 View commit details
    Browse the repository at this point in the history