Commit d9096d06 authored by Jean Rabreau's avatar Jean Rabreau
Browse files

馃 accept null item description & viewer properties

parent 85b09001
......@@ -17,7 +17,7 @@
<h3>{{ $t('project.generalInfo.label') }}</h3><v-form ref="itemEdit">
<item-form-detail
ref="itemFormDetail"
:presentation="item.description"
:presentation="item.description || ''"
:is-public="item.isPublic"
/>
</v-form>
......
......@@ -133,7 +133,7 @@ export default {
: [];
},
isDownloadable() {
return this.item.viewer.isDownloadable;
return !!this.item.viewer && this.item.viewer.isDownloadable;
},
},
methods: {
......
......@@ -2,7 +2,7 @@
<v-sheet
class="mt-2"
:class="hasVisual ? 'pa-2' : ''"
:height="item.viewer.component === 'Model' ? 800 : undefined"
:height="hasVisual && item.viewer.component === 'Model' ? 800 : undefined"
>
<v-row no-gutters class="fill-height">
<v-col
......@@ -77,12 +77,12 @@ export default {
...mapState('item', { item: 'current' }),
...mapGetters('item', ['fileView']),
component() {
return this.item.viewer.component
return this.item.viewer && this.item.viewer.component
? () => import(`@/components/renderer/file/${this.item.viewer.component}`)
: null;
},
hasVisual() {
return !!this.item.viewer.fileId
return !!this.item.viewer && !!this.item.viewer.fileId
},
},
methods: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment