summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notebook
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-01-08 20:45:34 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-01-08 20:48:27 +0000
commit7e3405d76cbd683ea557835c4cd96af9bda9cf4c (patch)
tree1163011d9b749ab2b3966878b266dffbde625102 /app/assets/javascripts/notebook
parent349d06688fa956732390e15cefc9006a1dd1bf8c (diff)
downloadgitlab-ce-7e3405d76cbd683ea557835c4cd96af9bda9cf4c.tar.gz
Fix last eslint rules
Diffstat (limited to 'app/assets/javascripts/notebook')
-rw-r--r--app/assets/javascripts/notebook/cells/output/index.vue25
1 files changed, 13 insertions, 12 deletions
diff --git a/app/assets/javascripts/notebook/cells/output/index.vue b/app/assets/javascripts/notebook/cells/output/index.vue
index 5bde30799b0..91b2269a83a 100644
--- a/app/assets/javascripts/notebook/cells/output/index.vue
+++ b/app/assets/javascripts/notebook/cells/output/index.vue
@@ -26,30 +26,18 @@
default: () => ({}),
},
},
- data() {
- return {
- outputType: '',
- };
- },
computed: {
componentName() {
if (this.output.text) {
return 'code-cell';
} else if (this.output.data['image/png']) {
- this.outputType = 'image/png';
-
return 'image-output';
} else if (this.output.data['text/html']) {
- this.outputType = 'text/html';
-
return 'html-output';
} else if (this.output.data['image/svg+xml']) {
- this.outputType = 'image/svg+xml';
-
return 'html-output';
}
- this.outputType = 'text/plain';
return 'code-cell';
},
rawCode() {
@@ -59,6 +47,19 @@
return this.dataForType(this.outputType);
},
+ outputType() {
+ if (this.output.text) {
+ return '';
+ } else if (this.output.data['image/png']) {
+ return 'image/png';
+ } else if (this.output.data['text/html']) {
+ return 'text/html';
+ } else if (this.output.data['image/svg+xml']) {
+ return 'image/svg+xml';
+ }
+
+ return 'text/plain';
+ },
},
methods: {
dataForType(type) {