Skip to content

Commit 217bfd2

Browse files
committed
Sorting out frame access
1 parent 96509e4 commit 217bfd2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/textures/Texture.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,16 @@ var Texture = new Class({
324324

325325
var frame = this.frames[name];
326326

327-
if (!frame)
327+
if (frame)
328+
{
329+
return frame.source.image;
330+
}
331+
else
328332
{
329333
console.warn(TEXTURE_MISSING_ERROR + name);
330334

331-
frame = '__BASE';
335+
return this.frames['__BASE'].source.image;
332336
}
333-
334-
return this.frames[frame].source.image;
335337
},
336338

337339
/**

0 commit comments

Comments
 (0)