Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

propChanged() uses undefined variables #248

Closed
sailormax opened this Issue · 3 comments

3 participants

@sailormax

"var i, len = renderers.length, renderer;" have to after IFs, because in some cases renderers is null => "renderers.length" is error.

Correct code:
function propChanged() {
var e = event;
if( !destroyed && !( e && e.propertyName in ignorePropertyNames ) ) {
if( initialized ) {
var i, len = renderers.length, renderer;
lockAll();
for( i = 0; i < len; i++ ) {
renderers[i].prepareUpdate();
}
for( i = 0; i < len; i++ ) {
renderer = renderers[i];
if( !renderer.isPositioned ) {
renderer.updatePos();
}
if( renderer.needsUpdate() ) {
renderer.updateProps();
}
}
rootRenderer.finishUpdate();
unlockAll();
}
else if( !initializing ) {
init();
}
}

}

Can anyone change it? I don't know how to use GitHub :)

@lojjic
Owner

Please provide a test case that demonstrates the issue this is trying to fix.

@lojjic
Owner

I'm closing this issue because there is no test case associated, and it patches code that is way out of date with master. If you can provide a testcase demonstrating the bug, and update the changes to match the master code, then feel free to reopen it.

@lojjic lojjic closed this
@dsherret

I had this issue in v1.0.0. I solved it by changing the following code...

function propChanged() {
    var len = (typeof renderers !== "undefined" && renderers !== null) ? renderers.length : 0;
    var i, renderer, e = event;

at the top of the function. Everything seems to be working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.