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
F14081449: D21222.diff
Fri, Nov 22, 7:57 PM
Unknown Object (File)
Wed, Nov 20, 9:34 AM
Unknown Object (File)
Sat, Nov 16, 1:40 PM
Unknown Object (File)
Tue, Nov 12, 5:00 AM
Unknown Object (File)
Fri, Nov 8, 2:06 PM
Unknown Object (File)
Thu, Oct 24, 3:20 PM
Unknown Object (File)
Oct 21 2024, 5:13 PM
Unknown Object (File)
Oct 19 2024, 1:01 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.