JS error in ArcGIS JS API after remove of a VectorTileLayer with native promises turned on

114
2
Jump to solution
01-28-2020 09:38 AM
AlexanderParshin
New Contributor II

Test case:

1. Turn on native promises

2. Add a VectorTileLayer

3. Remove the VectorTileLayer

Uncaught JS errors appear in the console immediately after layer removal.

Codepen: https://codepen.io/parshin/pen/OJPYLXm?editors=1000  (based on VectorTileLayer | ArcGIS API for JavaScript 4.14, but with turned on native promises and removing of the layer after 10 seconds)

Browser: Chromium Version 79.0.3945.79 

OS: Ubuntu 16.04 (64-bit)

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

I have tested the issue you reported and confirmed that this issue no longer exists at 4.15. At 4.15, the native promises will be enabled by default. You can check the fix for this issue on our "next" version. I have updated your app to use the next version. You should see that the error is gone. Here is your updated app to use the "next" version of the api.

Please let me know if this fixes your issue,

-Undral

View solution in original post

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

I have tested the issue you reported and confirmed that this issue no longer exists at 4.15. At 4.15, the native promises will be enabled by default. You can check the fix for this issue on our "next" version. I have updated your app to use the next version. You should see that the error is gone. Here is your updated app to use the "next" version of the api.

Please let me know if this fixes your issue,

-Undral

0 Kudos
AlexanderParshin
New Contributor II

Hi Undral,

Thanks for the answer, I confirm that it works well with the "next" version of the API!

0 Kudos