Skip to content

Commit a2644c9

Browse files
authored
Code cleanup suggestions from #7333
1 parent a3d678e commit a2644c9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/razor/src/document/razorDocumentSynchronizer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ export class RazorDocumentSynchronizer {
123123

124124
const documentKey = getUriPath(context.projectedDocument.uri);
125125
const synchronizations = this.synchronizations[documentKey];
126-
clearTimeout(context.timeoutId);
127126

128127
if (synchronizations.length === 1) {
129128
delete this.synchronizations[documentKey];
@@ -170,9 +169,8 @@ export class RazorDocumentSynchronizer {
170169
}
171170
},
172171
dispose: () => {
173-
while (rejectionsForCancel.length > 0) {
174-
rejectionsForCancel.pop();
175-
}
172+
rejectionsForCancel.length = 0;
173+
clearTimeout(context.timeoutId);
176174
},
177175
projectedDocumentSynchronized,
178176
onProjectedDocumentSynchronized,

0 commit comments

Comments
 (0)