ApiResponseCache: Add a check for data.query before accessing redirects

Follow-up: If4f8c9b6719c123b31d852eb71f06a79cc0f7917
Change-Id: I5f1814f341ce401fcb3926487a2cea276698bca0
This commit is contained in:
Santhosh Thottingal 2018-06-04 13:49:27 +05:30
parent a93d1e6102
commit b049a82e8d
No known key found for this signature in database
GPG key ID: 523DE28934DA0B5A

View file

@ -164,7 +164,7 @@ ve.init.mw.ApiResponseCache.prototype.processQueue = function () {
pages = ( data.query && data.query.pages ) || data.pages,
processed = {};
redirects = data.query.redirects || [];
redirects = ( data.query && data.query.redirects ) || [];
if ( pages ) {
for ( pageid in pages ) {
page = pages[ pageid ];