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
F15486728: D14021.diff
Thu, Apr 10, 9:12 AM
F15471171: D14021.id.diff
Sat, Apr 5, 3:51 AM
F15469686: D14021.diff
Fri, Apr 4, 3:33 PM
F15434934: D14021.diff
Tue, Mar 25, 6:08 AM
F15390352: D14021.id33906.diff
Sat, Mar 15, 6:08 AM
F15383073: D14021.id33909.diff
Fri, Mar 14, 3:28 PM
F15378044: D14021.id.diff
Thu, Mar 13, 12:19 PM
F15332190: D14021.id33906.diff
Mar 7 2025, 4:47 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
Branch
copynull
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7863
Build 8757: [Placeholder Plan] Wait for 30 Seconds
Build 8756: arc lint + arc unit

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.