Skip to content

Commit 242e3cc

Browse files
committed
Indentation errors fixed
1 parent d7cd76e commit 242e3cc

1 file changed

Lines changed: 38 additions & 40 deletions

File tree

src/loader/Loader.js

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ Phaser.Loader.prototype = {
14661466
file.loaded = true;
14671467

14681468
var loadNext = true;
1469-
var _this = this;
1469+
var _this = this
14701470

14711471
switch (file.type)
14721472
{
@@ -1519,38 +1519,38 @@ Phaser.Loader.prototype = {
15191519

15201520
if (this.useXDomainRequest && window.XDomainRequest)
15211521
{
1522-
this._ajax = new window.XDomainRequest();
1522+
this._ajax = new window.XDomainRequest();
15231523

1524-
// XDomainRequest has a few quirks. Occasionally it will abort requests
1525-
// A way to avoid this is to make sure ALL callbacks are set even if not used
1526-
// More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9
1527-
this._ajax.timeout = 3000;
1524+
// XDomainRequest has a few quirks. Occasionally it will abort requests
1525+
// A way to avoid this is to make sure ALL callbacks are set even if not used
1526+
// More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9
1527+
this._ajax.timeout = 3000;
15281528

1529-
this._ajax.onerror = function () {
1530-
return _this.dataLoadError(_this._fileIndex);
1531-
};
1529+
this._ajax.onerror = function () {
1530+
return _this.dataLoadError(_this._fileIndex);
1531+
};
15321532

1533-
this._ajax.ontimeout = function () {
1534-
return _this.dataLoadError(_this._fileIndex);
1535-
};
1533+
this._ajax.ontimeout = function () {
1534+
return _this.dataLoadError(_this._fileIndex);
1535+
};
15361536

1537-
this._ajax.onprogress = function() {};
1537+
this._ajax.onprogress = function() {};
15381538

1539-
this._ajax.onload = function(){
1540-
return _this.xmlLoadComplete(_this._fileIndex);
1541-
};
1539+
this._ajax.onload = function(){
1540+
return _this.xmlLoadComplete(_this._fileIndex);
1541+
};
15421542

1543-
this._ajax.open('GET', this.baseURL + file.xmlURL, true);
1543+
this._ajax.open('GET', this.baseURL + file.xmlURL, true);
15441544

1545-
// Note: The xdr.send() call is wrapped in a timeout to prevent an issue with the interface where some requests are lost
1546-
// if multiple XDomainRequests are being sent at the same time.
1547-
setTimeout(function () {
1548-
_this._ajax.send();
1549-
}, 0);
1545+
// Note: The xdr.send() call is wrapped in a timeout to prevent an issue with the interface where some requests are lost
1546+
// if multiple XDomainRequests are being sent at the same time.
1547+
setTimeout(function () {
1548+
_this._ajax.send();
1549+
}, 0);
15501550
}
15511551
else
15521552
{
1553-
this.xhrLoad(this._fileIndex, this.baseURL + file.xmlURL, 'text', 'xmlLoadComplete', 'dataLoadError');
1553+
this.xhrLoad(this._fileIndex, this.baseURL + file.xmlURL, 'text', 'xmlLoadComplete', 'dataLoadError');
15541554
}
15551555
}
15561556
break;
@@ -1728,23 +1728,21 @@ Phaser.Loader.prototype = {
17281728
xmlLoadComplete: function (index) {
17291729
var data;
17301730

1731-
if (this._ajax && this._ajax.responseText)
1732-
{
1733-
if (this._ajax.contentType !== '' && this._ajax.contentType !== 'text/plain')
1734-
{
1735-
console.warn('Invalid XML Response Type', this._fileList[index]);
1736-
console.warn(this._ajax);
1737-
}
1738-
data = this._ajax.responseText;
1739-
}
1740-
else if (this._xhr && this._xhr.responseText)
1741-
{
1742-
if (this._xhr.responseType !== '' && this._xhr.responseType !== 'text')
1743-
{
1744-
console.warn('Invalid XML Response Type', this._fileList[index]);
1745-
console.warn(this._xhr);
1746-
}
1747-
data = this._xhr.responseText;
1731+
if (this._ajax && this._ajax.responseText) {
1732+
if (this._ajax.contentType !== '' && this._ajax.contentType !== 'text/plain')
1733+
{
1734+
console.warn('Invalid XML Response Type', this._fileList[index]);
1735+
console.warn(this._ajax);
1736+
}
1737+
data = this._ajax.responseText
1738+
}
1739+
else if (this._xhr && this._xhr.responseText) {
1740+
if (this._xhr.responseType !== '' && this._xhr.responseType !== 'text')
1741+
{
1742+
console.warn('Invalid XML Response Type', this._fileList[index]);
1743+
console.warn(this._xhr);
1744+
}
1745+
data = this._xhr.responseText;
17481746
}
17491747

17501748
var xml;

0 commit comments

Comments
 (0)