diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-01-08 20:45:34 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-01-08 20:48:27 +0000 |
commit | 7e3405d76cbd683ea557835c4cd96af9bda9cf4c (patch) | |
tree | 1163011d9b749ab2b3966878b266dffbde625102 /app/assets/javascripts/notebook | |
parent | 349d06688fa956732390e15cefc9006a1dd1bf8c (diff) | |
download | gitlab-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.vue | 25 |
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) { |