made loading of config values more fault tolerant.
This commit is contained in:
@@ -30,8 +30,9 @@ var CodeOceanEditor = {
|
|||||||
lastCopyText: null,
|
lastCopyText: null,
|
||||||
|
|
||||||
<% @config ||= CodeOcean::Config.new(:code_ocean).read(erb: false) %>
|
<% @config ||= CodeOcean::Config.new(:code_ocean).read(erb: false) %>
|
||||||
sendLearningAnalyticEvents: <%= @config['codeocean_events']['enabled'] %>,
|
sendLearningAnalyticEvents: <%= @config['codeocean_events'] ? @config['codeocean_events']['enabled'] : false %>,
|
||||||
learningAnalyticsURL: "<%= @config['codeocean_events']['url'] %>",
|
learningAnalyticsURL: "<%= @config['codeocean_events'] ? @config['codeocean_events']['url'] : "" %>",
|
||||||
|
|
||||||
|
|
||||||
configureEditors: function () {
|
configureEditors: function () {
|
||||||
_.each(['modePath', 'themePath', 'workerPath'], function (attribute) {
|
_.each(['modePath', 'themePath', 'workerPath'], function (attribute) {
|
||||||
|
Reference in New Issue
Block a user