kopia lustrzana https://github.com/c9/core
prevent most of caught exceptions when loading ide
rodzic
876eb083bc
commit
5913d69152
|
@ -56,7 +56,7 @@
|
|||
"c9.ide.language.html.diff": "#a7311cfc9f",
|
||||
"c9.ide.language.javascript": "#8479d0a9c1",
|
||||
"c9.ide.language.javascript.immediate": "#9a2cce9121",
|
||||
"c9.ide.language.javascript.eslint": "#129a16dafb",
|
||||
"c9.ide.language.javascript.eslint": "#2db744b1a3",
|
||||
"c9.ide.language.javascript.tern": "#7aab8b0b6a",
|
||||
"c9.ide.language.javascript.infer": "#cfec494a3c",
|
||||
"c9.ide.language.jsonalyzer": "#dab3edfca5",
|
||||
|
@ -72,7 +72,7 @@
|
|||
"c9.ide.ace.keymaps": "#43445d6306",
|
||||
"c9.ide.ace.repl": "#ada99852fa",
|
||||
"c9.ide.ace.split": "#0ae0151c78",
|
||||
"c9.ide.ace.statusbar": "#d7b45bb7c3",
|
||||
"c9.ide.ace.statusbar": "#d95be89d53",
|
||||
"c9.ide.ace.stripws": "#cf0f42ac59",
|
||||
"c9.ide.behaviors": "#6aad7006a0",
|
||||
"c9.ide.closeconfirmation": "#a28bfd8272",
|
||||
|
|
|
@ -429,7 +429,7 @@ define(function(require, exports, module) {
|
|||
return JSON.parse(JSON.stringify(json));
|
||||
|
||||
try {
|
||||
var obj = JSON.parse(json);
|
||||
var obj = json && JSON.parse(json);
|
||||
return obj;
|
||||
}
|
||||
catch (e) {
|
||||
|
|
|
@ -142,22 +142,11 @@ define(function(require, exports, module) {
|
|||
|
||||
function setTheme(path, isPreview, fromServer, $err) {
|
||||
// Get Theme or wait for theme to load
|
||||
try {
|
||||
theme = typeof path == "object"
|
||||
? path
|
||||
: fromServer || require(path);
|
||||
|
||||
// fixes a problem with Ace architect loading /lib/ace
|
||||
// creating a conflict with themes
|
||||
if (!theme || theme.isDark === undefined)
|
||||
throw new Error();
|
||||
}
|
||||
catch (e) {
|
||||
// not checking this can create infinite loop in build
|
||||
$err || require([path], function(){
|
||||
setTheme(path, isPreview, fromServer, true);
|
||||
theme = fromServer;
|
||||
if (!theme) {
|
||||
return $err || config.loadModule(path, function(m) {
|
||||
setTheme(path, isPreview, m, true);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isPreview) {
|
||||
|
|
Ładowanie…
Reference in New Issue