Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I ran into an exception due to null #169

Open
shi-yan opened this issue Jan 3, 2025 · 1 comment
Open

I ran into an exception due to null #169

shi-yan opened this issue Jan 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@shi-yan
Copy link

shi-yan commented Jan 3, 2025

layer.value!.addEventListener(evtHandler, annotationsEvents)

the above line caused : Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'F.value.addEventListener')

Screenshot 2025-01-02 at 8 07 30 PM Screenshot 2025-01-02 at 8 07 17 PM

I think there might be some race condition.

@vordimous vordimous added the bug Something isn't working label Feb 25, 2025
@vordimous
Copy link
Collaborator

You can put your code in a nextTick or Vue lifecycle hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants