Hi all,
I am using hitTest to get layer attributes in my webmap. For layers, which i do not use in hitTest i get error: response.results.filter(...)[0] is undefined. i tried a lot, but could not remove this error or hide. It does nothing, but it is annoying to see in console.
Any ideas?
Thanks
Do you have a snippet or something to show how you are using hitTest and doing this filter? If there are no results, accessing it via array[0] will be undefined on an empty array. You can use response.results.find() and check for null instead. But you should be doing some kind of null checking in this scenario.