I have a search function in my application which gets me customers. Therefore I got an complex "Customer" object. So the list is of type Customer.
This list is filled properly on button click. But when I want to clear the list on Button click a error is thrown in my browser console:
TypeError: Cannot read property 'length' of undefined
What is the correct way to clear a list of complex object? Currently I am using a General Service which does the following:
tw.local.searchResults = new tw.object.listOf.Customer();
This throws me the above error.
Any Ideas?