Use diferent file.js in diferent file.ux

Hi , I use two JavaScript in two file ux (MainView.ux use Main,js and the search.ux (inside of MainView.ux with ux:Class=“search”) use search.js ), inside of search.ux make a call of teamRow (another ux),that use one Each that use one Item that declare in Main.js and in search.js.

All work but the problem is when I make a call again with the same method of this item the preview say Object reference not set to an instance of and object.

Is for problem insert the js file (use JavaScript File=“search.js” )? or change the Each Items="{list}" to Each Items="{listSearch}" and make another ux file ? .

###Fixed###

I fixed , when start the function that I call , make the itemSearch.value="" (The item are a itemSearch= Observable();), I use the same function(Copy & Paste) with diferent call var , maybe broke becouse the var ItemSearch is declared in two diferents javascripts