Fixes microsoft/monaco-editor#2328: In some webpack configurations, process can be defined, while process.nextTick is not

This commit is contained in:
Alexandru Dima
2021-02-01 11:11:25 +01:00
parent 126959896f
commit 643cbb2aaa
+1 -1
View File
@@ -235,7 +235,7 @@ export const setImmediate: ISetImmediate = (function defineSetImmediate() {
globals.postMessage({ vscodeSetImmediateId: myId }, '*');
};
}
if (nodeProcess) {
if (nodeProcess && typeof nodeProcess.nextTick === 'function') {
return nodeProcess.nextTick.bind(nodeProcess);
}
const _promise = Promise.resolve();