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
F15464830: D21222.id50541.diff
Wed, Apr 2, 12:53 PM
F15463964: D21222.id50544.diff
Wed, Apr 2, 5:07 AM
F15461960: D21222.id.diff
Tue, Apr 1, 12:41 PM
F15459924: D21222.diff
Mon, Mar 31, 6:20 PM
F15457161: D21222.diff
Sun, Mar 30, 2:41 PM
F15416045: D21222.id50544.diff
Thu, Mar 20, 8:55 AM
F15374901: D21222.id50541.diff
Mar 12 2025, 8:30 PM
F15316134: D21222.id50544.diff
Mar 6 2025, 6:23 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.