laptop and a wrench

Bogue

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

ArcGIS Maps SDK for JavaScript
Numéro d’ID de bogue BUG-000168429
EnvoiJune 18, 2024
Dernière modificationDecember 6, 2024
S’applique àArcGIS Maps SDK for JavaScript
Version trouvée4.29
Système d’exploitationWindows OS
Version du système d’exploitationN/A
StatutAs Designed

Informations supplémentaires

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.

Solution de contournement

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

Étapes pour reproduire

ID de bogue: BUG-000168429

Logiciel:

  • ArcGIS Maps SDK for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement