Skip to content

Batch unsubscribe issue #2

@lifeart

Description

@lifeart

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions