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

Batch unsubscribe issue #2

Closed
lifeart opened this issue May 1, 2024 · 0 comments · Fixed by #26
Closed

Batch unsubscribe issue #2

lifeart opened this issue May 1, 2024 · 0 comments · Fixed by #26

Comments

@lifeart
Copy link

lifeart commented May 1, 2024

Once I'm trying to unsubscribe all computeds in the end of render cycle, I got this errors:

image

Cannot read properties of undefined (reading 'liveConsumerNode')
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'wrapper')

PR to play with: lifeart/glimmer-next#118

How to reproduce:

Open https://deploy-preview-118--g-next.netlify.app/todomvc
Add any todo item
Try to switch between Active/Completed tabs

If I unsubscribe one-by-one, no issue appears:

export const w = new Signal.subtle.Watcher(() => {
    scheduleRevalidate();
});

// works fine
signalsToUnwatch.forEach((signal) => {
  w.unwatch(signal);
});

// breaking
w.unwatch(....signalsToUnwatch);
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 a pull request may close this issue.

1 participant