Skip to content

Commit

Permalink
Revert "change cleanup stale chore call"
Browse files Browse the repository at this point in the history
This reverts commit 71e388a.
  • Loading branch information
Varixo committed Aug 19, 2024
1 parent 71e388a commit 19be81b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
16 changes: 6 additions & 10 deletions packages/qwik/src/core/v2/client/vnode-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1256,22 +1256,18 @@ export function cleanup(container: ClientContainer, vNode: VNode) {

const isProjection =
type & VNodeFlags.Virtual && vnode_getProp(vCursor as VirtualVNode, QSlot, null) !== null;

if (!isProjection) {
/**
* Cleanup stale chores for current vCursor, but only if it is not a projection. We need to
* do this to prevent stale chores from running after the vnode is removed. (for example
* signal subscriptions)
*/
container.$scheduler$.cleanupStaleChores(vCursor as VirtualVNode);
}

// Descend into children
if (!isProjection) {
// Only if it is not a projection
const vFirstChild = vnode_getFirstChild(vCursor);
if (vFirstChild) {
vCursor = vFirstChild;
/**
* Cleanup stale chores for current vCursor, but only if it is not a projection. We need
* to do this to prevent stale chores from running after the vnode is removed. (for
* example signal subscriptions)
*/
container.$scheduler$.cleanupStaleChores(vCursor as VirtualVNode);
continue;
}
} else if (vCursor === vNode) {
Expand Down
3 changes: 2 additions & 1 deletion starters/e2e/e2e.signals.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ test.describe("signals", () => {
});

function tests() {
test("should do its thing", async ({ page }) => {
// TODO(v2): fix this
test.skip("should do its thing", async ({ page }) => {
const incrementBtn = page.locator("#count");
const clickBtn = page.locator("#click");
const incrementIdBtn = page.locator("#increment-id");
Expand Down

0 comments on commit 19be81b

Please sign in to comment.