Skip to content

Commit

Permalink
fix: remove redundant unrefSet calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Aug 8, 2022
1 parent 920941a commit 778b8ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Binary file modified export-sizes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 3 additions & 8 deletions src/observables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,9 @@ export function dispose(fn: () => void) {

emptyDisposal(fn);

unrefSet(fn, CHILDREN);
unrefSet(fn, DISPOSAL);
unrefSet(fn, OBSERVERS);

fn[CHILDREN] = undefined;
fn[DISPOSAL] = undefined;
fn[OBSERVERS] = undefined;
fn[PARENT] = undefined;
fn[DIRTY] = false;
fn[DISPOSED] = true;
Expand Down Expand Up @@ -564,10 +563,6 @@ function emptyDisposal(node: Node) {
}
}

function unrefSet(parent: any, key: symbol) {
parent[key] = undefined;
}

function notEqual(a: unknown, b: unknown) {
return a !== b;
}
Expand Down

0 comments on commit 778b8ee

Please sign in to comment.