Skip to content

Commit b185307

Browse files
author
Omar Shehata
committed
Replaced all uses of 'let' with 'var' to support older browsers
1 parent 4fa109d commit b185307

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/physics/matter-js/World.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,9 @@ var World = new Class({
634634
graphics.lineStyle(1, this.defaults.bodyDebugColor);
635635
graphics.beginPath();
636636

637-
for (let i = 0; i < bodies.length; i++)
637+
var i,j;
638+
639+
for (i = 0; i < bodies.length; i++)
638640
{
639641
if (!bodies[i].render.visible)
640642
{
@@ -643,7 +645,7 @@ var World = new Class({
643645

644646
// Handle drawing both single bodies and compound bodies. If compound, draw both the
645647
// convex hull (first part) and the rest of the bodies.
646-
for (let j = 0; j < bodies[i].parts.length; j++)
648+
for (j = 0; j < bodies[i].parts.length; j++)
647649
{
648650
var body = bodies[i].parts[j];
649651

@@ -670,7 +672,7 @@ var World = new Class({
670672

671673
// Render constraints
672674
var constraints = Composite.allConstraints(this.localWorld);
673-
for (let i = 0; i < constraints.length; i++)
675+
for (i = 0; i < constraints.length; i++)
674676
{
675677
var constraint = constraints[i];
676678

@@ -723,7 +725,7 @@ var World = new Class({
723725
coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20)),
724726
offset;
725727

726-
for (let j = 1; j < coils; j += 1)
728+
for (j = 1; j < coils; j += 1)
727729
{
728730
offset = j % 2 === 0 ? 1 : -1;
729731

0 commit comments

Comments
 (0)