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
Unknown Object (File)
Sat, Jun 6, 5:52 AM
Unknown Object (File)
Apr 7 2026, 4:44 AM
Unknown Object (File)
Apr 3 2026, 12:57 AM
Unknown Object (File)
Dec 2 2025, 12:34 PM
Unknown Object (File)
Nov 29 2025, 12:17 PM
Unknown Object (File)
Nov 17 2025, 1:04 PM
Unknown Object (File)
Oct 27 2025, 6:32 AM
Unknown Object (File)
Oct 12 2025, 6:47 PM
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.