File tree Expand file tree Collapse file tree
src/gameobjects/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,13 +31,15 @@ Phaser.Component.LoadTexture.prototype = {
3131
3232 var setFrame = true ;
3333 var smoothed = ! this . texture . baseTexture . scaleMode ;
34+ var isRenderTexture = false ;
3435
35- if ( key instanceof Phaser . RenderTexture )
36+ if ( Phaser . RenderTexture && key instanceof Phaser . RenderTexture )
3637 {
3738 this . key = key . key ;
3839 this . setTexture ( key ) ;
40+ isRenderTexture = true ;
3941 }
40- else if ( key instanceof Phaser . BitmapData )
42+ else if ( Phaser . BitmapData && key instanceof Phaser . BitmapData )
4143 {
4244 // This works from a reference, which probably isn't what we need here
4345 this . setTexture ( key . texture ) ;
@@ -72,7 +74,7 @@ Phaser.Component.LoadTexture.prototype = {
7274 }
7375 }
7476
75- if ( ! key instanceof Phaser . RenderTexture )
77+ if ( ! isRenderTexture )
7678 {
7779 this . texture . baseTexture . dirty ( ) ;
7880 }
You can’t perform that action at this time.
0 commit comments