Skip to content

Commit

Permalink
fix(cache): minor performance refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
smalluban committed May 16, 2019
1 parent 18fa15c commit c2c42f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export function get(target, key, getter) {
return entry.value;
}

entry.deps.clear();
if (entry.deps.size) {
entry.deps.clear();
}

try {
const nextValue = getter(target, entry.value);
Expand Down

0 comments on commit c2c42f5

Please # to comment.