mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
remove unnecessary global uncaught promise handler
- monaco issue https://github.com/microsoft/monaco-editor/issues/2382
This commit is contained in:
parent
7f30748a41
commit
db90e1f801
@ -150,19 +150,6 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
|
||||
function init(options) {
|
||||
|
||||
//Handles "Uncaught (in promise) Canceled: Canceled"
|
||||
//@see https://github.com/microsoft/monaco-editor/issues/2382
|
||||
//This is fixed in commit microsoft/vscode@49cad9a however it is not yet present monaco-editor
|
||||
//Remove the below addEventListener once monaco-editor V0.23.1 or greater is published
|
||||
window.addEventListener('unhandledrejection', function(evt) {
|
||||
if(evt && evt.reason && evt.reason.stack) {
|
||||
if (evt.reason.name === 'Canceled' && evt.reason.stack.indexOf('vendor/monaco/dist') >= 0) {
|
||||
evt.preventDefault();
|
||||
evt.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Handles orphaned models
|
||||
//ensure loaded models that are not explicitly destroyed by a call to .destroy() are disposed
|
||||
RED.events.on("editor:close",function() {
|
||||
|
Loading…
Reference in New Issue
Block a user