Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sim.js: update()-function defined twice #6

Open
Dahie opened this issue Jan 4, 2013 · 0 comments
Open

sim.js: update()-function defined twice #6

Dahie opened this issue Jan 4, 2013 · 0 comments

Comments

@Dahie
Copy link

Dahie commented Jan 4, 2013

In the sim.js lib at line 462-465 you have this function definition for Sim.Object

Sim.Object.prototype.update = function()
{
this.updateChildren();
}

Later in line 505 this function definition starts defining Sim.Object.prototype.update a second time

Sim.Object.prototype.update = function()
{
var i, len;
len = this.children.length;
for (i = 0; i < len; i++)
{
    this.children[i].update();
}
}

I guess the first definition gets overwritten and so the first definition simple gets ignored and so no errors derive. updateChildren() is nowhere defined.

This could be cleaned up in a later revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant