mw.api.postWithToken now forwards promise on fail if we have token
authorNiklas Laxström <niklas.laxstrom@gmail.com>
Tue, 22 Oct 2013 09:50:05 +0000 (09:50 +0000)
committerNiklas Laxström <niklas.laxstrom@gmail.com>
Tue, 22 Oct 2013 09:50:05 +0000 (09:50 +0000)
commitaf628c514103163e2d8a75915140602d4c0130a7
treec21e0e98bc6dfb503c32b04a92e4a8850484a240
parent8c6e0901332333de3c92740e4badd4ea2c4f782b
mw.api.postWithToken now forwards promise on fail if we have token

Without this fix the callers of this function could not read the
failure code and result, because we returned undefined. Because
we are using a filter function, we need to explicitly return the
promise to pass it forward.

Change-Id: I71984ac827618459f723b0b9f47d4dc29e2a2f70
resources/mediawiki.api/mediawiki.api.js