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
F18780692: D21222.id50541.diff
Sun, Oct 12, 6:47 PM
F18762559: D21222.id50544.diff
Mon, Oct 6, 7:36 PM
F18734290: D21222.id.diff
Tue, Sep 30, 10:51 PM
F18702769: D21222.diff
Sun, Sep 28, 1:27 AM
F18649590: D21222.diff
Sat, Sep 20, 9:26 PM
F18649558: D21222.diff
Sat, Sep 20, 9:20 PM
F18649530: D21222.diff
Sat, Sep 20, 9:12 PM
F18605342: D21222.diff
Sep 13 2025, 8:26 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.