Remove unnecessary .promise() call

In the mediawiki gateway fetch uses mw.Api which when calling ajax
returns a promise (not a deferred).

Thus .promise() here is unnecessary and happens to work because of
jQuery promises but it is not a standard method on JS promises so it
shouldn't be used on promises, only on deferreds.

Change-Id: Iec609b90bffad8b99b3908897dfb72d7c4ed5481
This commit is contained in:
joakin 2018-01-18 18:07:43 +01:00
parent 4adf63b024
commit 7169210406
3 changed files with 1 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -73,8 +73,7 @@ export default function createMediaWikiApiGateway( api, config ) {
return fetch( title )
.then( extractPageFromResponse )
.then( formatPlainTextExtract )
.then( convertPageToModel )
.promise();
.then( convertPageToModel );
}
return {