Skip to content

Commit e0a620a

Browse files
committed
Revert of the setTimeout added to address the yaml editor crash when ACM and MCE plugins are enabled.
It ended up not fixing that bug and caused a new bug Previous pr for yaml editor crash #13195
1 parent 1935fa0 commit e0a620a

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

frontend/packages/console-shared/src/components/editor/yaml-editor-utils.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -221,20 +221,18 @@ export const enableYAMLValidation = (
221221
tryFolding();
222222
}
223223

224-
setTimeout(() => {
225-
getModel()?.onDidChangeContent(() => {
226-
tryFolding();
227-
228-
const document = createDocument(getModel());
229-
cleanPendingValidation(document);
230-
pendingValidationRequests.set(
231-
document.uri,
232-
setTimeout(() => {
233-
pendingValidationRequests.delete(document.uri);
234-
doValidate(document);
235-
}),
236-
);
237-
});
224+
getModel()?.onDidChangeContent(() => {
225+
tryFolding();
226+
227+
const document = createDocument(getModel());
228+
cleanPendingValidation(document);
229+
pendingValidationRequests.set(
230+
document.uri,
231+
setTimeout(() => {
232+
pendingValidationRequests.delete(document.uri);
233+
doValidate(document);
234+
}),
235+
);
238236
});
239237
};
240238

0 commit comments

Comments
 (0)