mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
e865409593
Instead of using the non-standard old Promise implementation by relying on .fail, migrate it to .catch. In this specific case, where we were chaining promises with $.when, the semantics from going from fail to catch actually change. .fail keeps the promise in a rejected state, while .catch will change it to resolved unless another error is thrown. As such, when changing it to .catch, the catched error will be re-thrown to keep the promise in a rejected state, so that $.when.then is not executed. Additional changes: * Make actions.js#fetch return its promise for ease of testing. * Test FETCH_FAILED, which was fully untested. Bug: T173819 Change-Id: Ibd380b714586979c6e60b4c969d17f36a0796b52 |
||
---|---|---|
.. | ||
browser | ||
node-qunit | ||
phpunit | ||
.jscsrc.js |