Page MenuHomePhabricator

JavaScript error on titles with name of predefined Object properties
Closed, ResolvedPublic0 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue:

What happens?:
The JavaScript console contains:

Uncaught TypeError: watchstarsByTitle[normalizedTitle].push is not a function

What should have happened instead?:
No error should happen.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 935739 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/core@master] mediawiki.page.watch.ajax: Use Object.create( null ) instead of {}

https://gerrit.wikimedia.org/r/935739

Change 935739 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.page.watch.ajax: Use Object.create( null ) instead of {}

https://gerrit.wikimedia.org/r/935739

Needs to be verified in production when deployed (at time of writing this looks like it would be 26th July)

Jdlrobson set the point value for this task to 0.Jul 24 2023, 9:02 PM

1.41.0-wmf.19 is now deployed on https://en.wiktionary.org/wiki/hasOwnProperty and there are no JavaScript errors anymore.