Skip to content

Commit

Permalink
fix: 累计count每次清空 #104
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 22, 2020
1 parent e62b985 commit 20ab87b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18645,10 +18645,8 @@
} // 需累加跳链路积累的数字


if (hash.hasOwnProperty(lv)) {
count += hash[lv];
} // 当>临界值时,进行cacheTotal合并

count += hash[lv] || 0;
hash[lv] = 0; // 当>临界值时,进行cacheTotal合并

if (count >= NUM && !node.__limitCache) {
count = 1;
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/refresh/struct.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,8 @@ function renderCacheCanvas(renderMode, ctx, defs, root) {
count++;
}
// 需累加跳链路积累的数字
if(hash.hasOwnProperty(lv)) {
count += hash[lv];
}
count += hash[lv] || 0;
hash[lv] = 0;
// 当>临界值时,进行cacheTotal合并
if(count >= NUM && !node.__limitCache) {
count = 1;
Expand Down

0 comments on commit 20ab87b

Please sign in to comment.