Skip to content

Commit 20aeff9

Browse files
authored
Merge pull request phaserjs#3521 from mchiasson/patch-1
closes phaserjs#3520
2 parents 8172742 + abfd244 commit 20aeff9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/display/canvas/CanvasPool.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@ var CanvasPool = function ()
126126
{
127127
if (canvasType === undefined) { canvasType = CONST.CANVAS; }
128128

129-
pool.forEach(function (container)
129+
for (var i = 0, len = pool.length; i < len; i++)
130130
{
131+
var container = pool[i];
131132
if (!container.parent && container.type === canvasType)
132133
{
133134
return container;
134135
}
135-
});
136+
}
136137

137138
return null;
138139
};

0 commit comments

Comments
 (0)