Skip to content

Commit 5af8e74

Browse files
committed
fixed getCamera in CameraManager to work correctly; forEach()-construct can't return values
(https://hacks.mozilla.org/2015/04/es6-in-depth-iterators-and-the-for-of-loop/)
1 parent d966aaa commit 5af8e74

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cameras/2d/CameraManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,13 @@ var CameraManager = new Class({
308308
*/
309309
getCamera: function (name)
310310
{
311-
this.cameras.forEach(function (camera)
311+
for (var camera of this.cameras)
312312
{
313313
if (camera.name === name)
314314
{
315315
return camera;
316316
}
317-
});
317+
}
318318

319319
return null;
320320
},

0 commit comments

Comments
 (0)