mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Fix error handling in controller#getPageData
We were accidentally resolving the promise with `undefined`, rather than rejecting it. This later caused "TypeError: Cannot read property 'linterrors' of undefined" in controller#checkCommentOnPage. Bug: T260294 Change-Id: I29418988023d86140cfa110c0c348059b293a716
This commit is contained in:
parent
b706eac8bc
commit
03539527b4
|
@ -101,6 +101,8 @@ function getPageData( pageName, oldId ) {
|
||||||
}, function () {
|
}, function () {
|
||||||
// Clear on failure
|
// Clear on failure
|
||||||
pageDataCache[ pageName ][ oldId ] = null;
|
pageDataCache[ pageName ][ oldId ] = null;
|
||||||
|
// Let caller handle the error
|
||||||
|
return $.Deferred().rejectWith( this, arguments );
|
||||||
} );
|
} );
|
||||||
return pageDataCache[ pageName ][ oldId ];
|
return pageDataCache[ pageName ][ oldId ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue