Merge pull request #3521 from mchiasson/patch-1

closes #3520
This commit is contained in:
Richard Davey 2018-04-09 10:11:35 +01:00 committed by GitHub
commit 20aeff9a12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,13 +126,14 @@ var CanvasPool = function ()
{
if (canvasType === undefined) { canvasType = CONST.CANVAS; }
pool.forEach(function (container)
for (var i = 0, len = pool.length; i < len; i++)
{
var container = pool[i];
if (!container.parent && container.type === canvasType)
{
return container;
}
});
}
return null;
};