ve.init.mw.ArticleTarget: Fix error handling in #prepareCacheKey

If the paction=serializeforcache request fails, we were erroneously
converting it to a successful result with no value, which later causes
an exception, because since 381b58585c
other code expects the result to an an object.

The bug was introduced in 2015 in 07001001be,
but until that recent change it would only cause a 'badcachekey'
error, which was handled correctly later.

Change-Id: Ie1ffc8c3e616a7d296f2186fb17eaf039971a44f
This commit is contained in:
Bartosz Dziewoński 2019-11-07 01:36:20 +01:00
parent 36bde9d1c6
commit a53c02f2c4

View file

@ -1323,6 +1323,7 @@ ve.init.mw.ArticleTarget.prototype.prepareCacheKey = function ( doc ) {
},
function () {
target.events.track( 'performance.system.serializeforcache.fail', { duration: ve.now() - start } );
return ve.createDeferred().reject();
}
);
} )