laptop and a wrench

Bug

TypeError: Unable to read properties of undefined (reading 'forEach') when accessing features from an interceptor's query result array.

ArcGIS Maps SDK for JavaScript
Bug-ID-Nummer BUG-000168429
EingereichtJune 18, 2024
Zuletzt geändertDecember 6, 2024
Gilt fürArcGIS Maps SDK for JavaScript
Gefunden in Version4.29
BetriebssystemWindows OS
BetriebssystemversionN/A
StatusAs Designed

Zusätzliche Informationen

The interceptor after must handle all types of results returned by /query. In this case there is a query call to get the feature count, so there are no features in the results, as expected. The solution is to first check if there are features in the response.

Workaround

Verify if an array is returned from the interceptor's query result prior to accessing each feature from the response.

Schritte zur Reproduzierung

Bug-ID: BUG-000168429

Software:

  • ArcGIS Maps SDK for JavaScript

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln