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
F18343332: D14021.diff
Tue, Aug 26, 7:50 AM
F18114136: D14021.id.diff
Wed, Aug 13, 3:50 AM
F18112666: D14021.id.diff
Tue, Aug 12, 7:24 PM
F18110484: D14021.diff
Mon, Aug 11, 8:14 PM
F18103881: D14021.id33909.diff
Sun, Aug 10, 8:26 AM
F18102615: D14021.id33906.diff
Sat, Aug 9, 10:06 PM
F18098834: D14021.diff
Fri, Aug 8, 11:16 PM
F18085143: D14021.id.diff
Tue, Aug 5, 7:01 PM
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.