Page MenuHomePhabricator

Don't copy `null` attributes passed to JX.$N()
ClosedPublic

Authored by epriestley on Aug 31 2015, 10:30 PM.
Tags
None
Referenced Files
F19044548: D14021.id.diff
Thu, Nov 27, 3:20 AM
F19034989: D14021.diff
Tue, Nov 25, 3:50 PM
F18818711: D14021.id33906.diff
Oct 22 2025, 1:52 AM
F18812071: D14021.id33906.diff
Oct 20 2025, 6:45 AM
F18803734: D14021.id.diff
Oct 18 2025, 3:23 AM
F18800293: D14021.diff
Oct 17 2025, 3:57 PM
F18673679: D14021.diff
Sep 25 2025, 11:34 AM
F18626726: D14021.id.diff
Sep 16 2025, 2:11 AM
Subscribers
None

Details

Summary

Fixes T8919. In Safari, node.href = null; has no effect, but in Chrome it is like node.href = "null";.

Instead, just use semantics similar to phutil_tag(): don't assign attributes with null values.

Test Plan

No more /null href in Chrome in Owners typehaead.

Typeahead still works in Chrome/Safari.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Don't copy `null` attributes passed to JX.$N().
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Aug 31 2015, 10:31 PM
This revision was automatically updated to reflect the committed changes.