Page MenuHomePhabricator

CentralNotice: Use Object.keys() instead of iterating over the object
Closed, DeclinedPublic


In resources/subscribing/ext.centralNotice.display.state.js

Event Timeline

Prtksxna triaged this task as Lowest priority.Jan 4 2018, 6:04 AM
Prtksxna created this task.

@AndyRussG do you think this would be ok for Google-Code-in-2017?

Krinkle closed this task as Declined.EditedOct 11 2019, 3:33 AM
Krinkle added a subscriber: Krinkle.

Obsolete. The JS pipeline was disabled in IE8 in 2016.

The code in question appears to no longer be a good candidate for using Object.keys() since that it wants isn't an array but a lookup table. Those would make more sense to generate with the for-loop (as it does today) then to create, fill and iterate an array, and then to create, iterate and fill an object. (the code also wouldn't be simpler).

Change 542311 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/CentralNotice@master] Remove obsolete comment about IE8

Change 542311 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Remove obsolete comment about IE8