mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +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 () {
|
||||
// Clear on failure
|
||||
pageDataCache[ pageName ][ oldId ] = null;
|
||||
// Let caller handle the error
|
||||
return $.Deferred().rejectWith( this, arguments );
|
||||
} );
|
||||
return pageDataCache[ pageName ][ oldId ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue