Skip to content

Commit 10712e7

Browse files
committed
refactor(system): simplify trackId handling in dependency logic
1 parent a3f52c0 commit 10712e7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/system.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,10 @@ export namespace Dependency {
174174
do {
175175
if (link !== undefined) {
176176
const sub: Link['sub'] = link.sub;
177+
const subTrackId = sub.trackId;
177178

178-
if (sub.trackId > 0) {
179-
if (sub.trackId === link.trackId) {
179+
if (subTrackId > 0) {
180+
if (subTrackId === link.trackId) {
180181
const subDirtyLevel = sub.dirtyLevel;
181182
if (subDirtyLevel < dirtyLevel) {
182183
sub.dirtyLevel = dirtyLevel;
@@ -199,7 +200,7 @@ export namespace Dependency {
199200
}
200201
}
201202
}
202-
} else if (sub.trackId === -link.trackId) {
203+
} else if (subTrackId === -link.trackId) {
203204

204205
const subDirtyLevel = sub.dirtyLevel;
205206
const notDirty = subDirtyLevel === DirtyLevels.None;

0 commit comments

Comments
 (0)