mrdoob/three.js — Issue #843: Uncaught TypeError: Cannot read property 'length' of undefined
Author: rougegoat
Created: 2011-12-05 06:04:42+00:00
State: open

Getting that error in my javascript console(in Chrome) with a collada object I'm attempting to add with a basic loader. It's specifically coming from the "scene.add( object )" chunk of it. Everything else seems to work just fine. The code for loading the object is as follows

var ltable;
var furnLoad = new THREE.ColladaLoader();

function addlt(){
furnLoad.load('../Models/Furniture/foldingLongTable.dae', function(collada){
ltable = collada.scene;
ltable.scale.x=ltable.scale.y=ltable.scale.z=1;
ltable.updateMatrix();
ltable.position.x=ltable.position.z=ltable.position.y=0;
});
scene.add( ltable );
}

This function is called during the init of a page that, otherwise, works just fine. That page can be found [here](http://babbage.cs.missouri.edu/~cs4970sp11grp2/webgl_tests/3/)(version without this table [here](http://babbage.cs.missouri.edu/~cs4970sp11grp2/webgl_tests/4/)), and the specific object [here](http://babbage.cs.missouri.edu/~cs4970sp11grp2/webgl_tests/Models/Furniture/foldingLongTable.dae).

What would be the recommended way to get past this error?