Page MenuHomePhabricator

Fix a JS issue when the anchor element on a page has no container

Authored by epriestley on Mon, May 4, 10:50 PM.



See D21213. If there's no matching element, findAbove() throws. Handle these cases correctly.

Test Plan

Visited #toc on a revision, no longer saw a JS error.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Mon, May 4, 10:50 PM
epriestley requested review of this revision.Mon, May 4, 10:51 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, May 4, 10:57 PM
This revision was automatically updated to reflect the committed changes.