<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic hitTest remove or hide ---- response.results.filter(...)[0] is undefined in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-remove-or-hide-response-results-filter-0/m-p/1159385#M76864</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using hitTest to get layer attributes in my webmap. For layers, which i do not use in hitTest i get error:&amp;nbsp;&lt;STRONG&gt;response.results.filter(...)[0] is undefined.&amp;nbsp;&lt;/STRONG&gt;i tried a lot, but could not remove this error or hide. It does&amp;nbsp; nothing, but it is annoying to see in console.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 14:00:01 GMT</pubDate>
    <dc:creator>Vakhtang_Zubiashvili</dc:creator>
    <dc:date>2022-03-30T14:00:01Z</dc:date>
    <item>
      <title>hitTest remove or hide ---- response.results.filter(...)[0] is undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-remove-or-hide-response-results-filter-0/m-p/1159385#M76864</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using hitTest to get layer attributes in my webmap. For layers, which i do not use in hitTest i get error:&amp;nbsp;&lt;STRONG&gt;response.results.filter(...)[0] is undefined.&amp;nbsp;&lt;/STRONG&gt;i tried a lot, but could not remove this error or hide. It does&amp;nbsp; nothing, but it is annoying to see in console.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:00:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-remove-or-hide-response-results-filter-0/m-p/1159385#M76864</guid>
      <dc:creator>Vakhtang_Zubiashvili</dc:creator>
      <dc:date>2022-03-30T14:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: hitTest remove or hide ---- response.results.filter(...)[0] is undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-remove-or-hide-response-results-filter-0/m-p/1159408#M76865</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:33:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-remove-or-hide-response-results-filter-0/m-p/1159408#M76865</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-03-30T14:33:04Z</dc:date>
    </item>
  </channel>
</rss>

