jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/373327 )
Change subject: Hygiene: Don't rely on .fail, use Promises/A+ ...................................................................... Hygiene: Don't rely on .fail, use Promises/A+ 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 --- M resources/dist/index.js M resources/dist/index.js.map M src/actions.js M tests/node-qunit/actions.test.js 4 files changed, 56 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/373327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd380b714586979c6e60b4c969d17f36a0796b52 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Jhernandez <[email protected]> Gerrit-Reviewer: Jdlrobson <[email protected]> Gerrit-Reviewer: Pmiazga <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
