Page MenuHomePhabricator

Remove/refactor functions that return jQuery.Promise OR void
Open, Needs TriagePublic

Description

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageTriage/+/1022626 identified a few cases where functions in the PageTriage codebase are returning either a jQuery.Promise or void/undefined depending on the code path. This is a problem since this kind of conditional return could cause errors where the callee expects a Promise but receives undefined.

We should probably refactor these functions to return jQuery.Promise regardless of which path they take.