summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-07-23 16:33:23 +0100
committerPhil Hughes <me@iamphill.com>2018-07-25 08:59:26 +0100
commitc8fba84719dafba516b58bb225ff04a4b22bd9dd (patch)
tree3baeeae45b3faad16cc2a3079124e5ba9ed69943
parent27680acc231cf06356352a7af39ecf98ae19e472 (diff)
downloadgitlab-ce-c8fba84719dafba516b58bb225ff04a4b22bd9dd.tar.gz
fixed issue with json parse when package.json contents havent been loaded
-rw-r--r--app/assets/javascripts/ide/components/preview/clientside.vue2
-rw-r--r--app/views/admin/application_settings/show.html.haml3
2 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/preview/clientside.vue b/app/assets/javascripts/ide/components/preview/clientside.vue
index e85acb268b8..121e7a3c1f7 100644
--- a/app/assets/javascripts/ide/components/preview/clientside.vue
+++ b/app/assets/javascripts/ide/components/preview/clientside.vue
@@ -30,6 +30,8 @@ export default {
}, {});
},
validProject() {
+ if (this.packageJson.raw === '') return false;
+
const parsedPackage = JSON.parse(this.packageJson.raw);
return parsedPackage.browser;
diff --git a/app/views/admin/application_settings/show.html.haml b/app/views/admin/application_settings/show.html.haml
index ef723db0ec8..589775b0b1d 100644
--- a/app/views/admin/application_settings/show.html.haml
+++ b/app/views/admin/application_settings/show.html.haml
@@ -336,7 +336,7 @@
.settings-content
= render 'third_party_offers', application_setting: @application_setting
-%section.settings.as-third-party-offers.no-animate#js-third-party-offers-settings{ class: ('expanded' if expanded) }
+%section.settings.no-animate#js-web-ide-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
= _('Web IDE')
@@ -360,4 +360,3 @@
= f.submit 'Save changes', class: "btn btn-success"
= render_if_exists 'admin/application_settings/pseudonymizer_settings', expanded: expanded
-