Skip to content

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

Open
JingWTG wants to merge 1 commit intoEsri: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 intoEsri:masterfrom
JingWTG:fix/transition-end-map-undefined

Conversation

@JingWTG
Copy link
Contributor

@JingWTG JingWTG commented Dec 9, 2025

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
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
Copy link
Contributor Author

JingWTG commented Dec 11, 2025

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
Copy link
Contributor Author

JingWTG commented Dec 15, 2025

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