mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +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;
|
||||
},
|
||||
function ( errorName, errorObject ) {
|
||||
var eventData;
|
||||
if ( errorObject && errorObject.xhr ) {
|
||||
var responseText = ve.getProp( errorObject, 'xhr', 'responseText' ),
|
||||
eventData;
|
||||
if ( responseText ) {
|
||||
eventData = {
|
||||
bytes: $.byteLength( errorObject.xhr.responseText ),
|
||||
bytes: $.byteLength( responseText ),
|
||||
duration: ve.now() - start
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue