Skip to content

Commit 6deffce

Browse files
committed
Move a couple of _this = this binds to before their first uses
1 parent 8d2a9fd commit 6deffce

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

v3/src/loader/filetypes/HTMLFile.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ HTMLFile.prototype.onProcess = function (callback)
5151
data.push('</svg>');
5252

5353
var svg = [ data.join('\n') ];
54+
var _this = this;
5455

5556
try
5657
{
@@ -69,8 +70,6 @@ HTMLFile.prototype.onProcess = function (callback)
6970

7071
this.data.crossOrigin = this.crossOrigin;
7172

72-
var _this = this;
73-
7473
this.data.onload = function ()
7574
{
7675
URL.revokeObjectURL(_this.data.src);

v3/src/loader/filetypes/SVGFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ SVGFile.prototype.onProcess = function (callback)
3131
this.state = CONST.FILE_PROCESSING;
3232

3333
var svg = [ this.xhrLoader.responseText ];
34+
var _this = this;
3435

3536
try
3637
{
@@ -49,7 +50,6 @@ SVGFile.prototype.onProcess = function (callback)
4950

5051
this.data.crossOrigin = this.crossOrigin;
5152

52-
var _this = this;
5353
var retry = false;
5454

5555
this.data.onload = function ()

0 commit comments

Comments
 (0)