@monaco-editor/react
Advanced tools
Comparing version 3.4.0 to 3.4.1
### Versions | ||
## 3.4.1 | ||
###### *July 3, 2020* | ||
- editor: improve initialization error handling | ||
## 3.4.0 | ||
@@ -4,0 +9,0 @@ ###### *June 28, 2020* |
@@ -66,3 +66,3 @@ "use strict"; | ||
}).catch(function (error) { | ||
return console.error('An error occurred during initialization of Monaco:', error); | ||
return (error === null || error === void 0 ? void 0 : error.type) !== 'cancelation' && console.error('Monaco initialization: error:', error); | ||
}); | ||
@@ -69,0 +69,0 @@ return function (_) { |
@@ -66,3 +66,3 @@ "use strict"; | ||
}).catch(function (error) { | ||
return console.error('An error occurred during initialization of Monaco:', error); | ||
return (error === null || error === void 0 ? void 0 : error.type) !== 'cancelation' && console.error('Monaco initialization: error:', error); | ||
}); | ||
@@ -69,0 +69,0 @@ return function (_) { |
@@ -8,3 +8,6 @@ "use strict"; | ||
// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325 | ||
var CANCELATION_MESSAGE = 'operation is manually canceled'; | ||
var CANCELATION_MESSAGE = { | ||
type: 'cancelation', | ||
msg: 'operation is manually canceled' | ||
}; | ||
@@ -17,5 +20,3 @@ var makeCancelable = function makeCancelable(promise) { | ||
}); | ||
promise.catch(function (error) { | ||
return reject(error); | ||
}); | ||
promise.catch(reject); | ||
}); | ||
@@ -22,0 +23,0 @@ return wrappedPromise.cancel = function (_) { |
{ | ||
"name": "@monaco-editor/react", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "Monaco editor wrapper for easy/one-line integration with React applications (e.g. powered by create-react-app) without need of webpack configuration files", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
64913
942