Skip to content

Fix _transitionEnd method to return early if _map is not defined - #245

Open
JingWTG wants to merge 1 commit into
Esri:masterfrom
JingWTG:fix/transition-end-map-undefined
Open

Fix _transitionEnd method to return early if _map is not defined#245
JingWTG wants to merge 1 commit into
Esri:masterfrom
JingWTG:fix/transition-end-map-undefined

Conversation

@JingWTG

@JingWTG JingWTG commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Our app encountered an error where this._map was undefined when the callback function in _transitionEnd() was executed. Since Util.requestAnimFrame() is an asynchronous operation, the map reference can become undefined by the time the callback runs (e.g., if the layer is removed from the map before the animation frame is processed).

@gavinr-maps

Copy link
Copy Markdown
Contributor

Hi, thank you for the PR. Are you able to post a public replication case to demonstrate the issue you're fixing? https://jsbin.com/jexevoy/edit?html,output

@JingWTG

JingWTG commented Dec 11, 2025

Copy link
Copy Markdown
Contributor Author

Hi, thank you for the PR. Are you able to post a public replication case to demonstrate the issue you're fixing? https://jsbin.com/jexevoy/edit?html,output

Hi, I couldn’t reproduce it — the error came from our error reporting system.

@JingWTG

JingWTG commented Dec 15, 2025

Copy link
Copy Markdown
Contributor Author

Message
Cannot read properties of null (reading 'getZoom')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants