Strange event while click on entity

Hello, when i click on an entity type set as ‘item’ this script is fired:

if (targType ==='item') {
    //pickup item and add to inventory
    if (distance < this.walkAnimCutoff) {
        //disable 3d object
        app.root.findByName(targName).enabled=false;
        //var inve = app.root.findByName('Root').script.dbase.targDB;
        if (targDB==='weapons') {
            for (var i=0;i<this.weapons.length;i++) {
                if(targName===this.weapons[i].name) {
                    this.inventory.push(this.weapons[i]);
                    console.log(this.inventory);
                }
            }
        }
        //this.inventory.push
    }
}

and after that the player start fall through the ground but i don’t have any error…any idea?

sorry solution came up yesterday while driving on autoroute, just need to add targType="";