Page MenuHomePhabricator

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

Authored by epriestley on May 4 2020, 10:50 PM.
Tags
None
Referenced Files
F17365690: D21222.id50541.diff
Sat, Jun 28, 1:49 PM
F17361101: D21222.id.diff
Sat, Jun 28, 11:58 AM
F17342302: D21222.diff
Fri, Jun 27, 4:31 PM
Unknown Object (File)
Thu, May 29, 7:59 PM
Unknown Object (File)
May 9 2025, 12:16 PM
Unknown Object (File)
Apr 24 2025, 5:08 PM
Unknown Object (File)
Apr 24 2025, 9:46 AM
Unknown Object (File)
Apr 21 2025, 9:40 AM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.May 4 2020, 10:57 PM
This revision was automatically updated to reflect the committed changes.