mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Check xhr.responseText is set before trying to send it to $.byteLength
Bug: T125399 Change-Id: I09881fe8b6db7d95e32732129d043c4a13fa7a9a
This commit is contained in:
parent
9ec0705a2b
commit
9808d04bfe
|
@ -1132,10 +1132,11 @@ ve.init.mw.ArticleTarget.prototype.tryWithPreparedCacheKey = function ( doc, opt
|
||||||
return jqxhr;
|
return jqxhr;
|
||||||
},
|
},
|
||||||
function ( errorName, errorObject ) {
|
function ( errorName, errorObject ) {
|
||||||
var eventData;
|
var responseText = ve.getProp( errorObject, 'xhr', 'responseText' ),
|
||||||
if ( errorObject && errorObject.xhr ) {
|
eventData;
|
||||||
|
if ( responseText ) {
|
||||||
eventData = {
|
eventData = {
|
||||||
bytes: $.byteLength( errorObject.xhr.responseText ),
|
bytes: $.byteLength( responseText ),
|
||||||
duration: ve.now() - start
|
duration: ve.now() - start
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue