* fix #4538

* clean up

* fix

* fix
This commit is contained in:
tamaina 2019-03-19 23:35:22 +09:00 committed by syuilo
parent 130d8ff25d
commit 0f8246705b

View file

@ -36,7 +36,6 @@
<script lang="ts">
import Vue from 'vue';
import anime from 'animejs';
import i18n from '../../../i18n';
import {
faFile,
faFileAlt,
@ -104,7 +103,11 @@ export default Vue.extend({
return 'unknown';
},
isThumbnailAvailable(): boolean {
return this.file.thumbnailUrl.endsWith('?thumbnail') ? (this.is === 'image' || this.is === 'video') : true;
return this.file.thumbnailUrl
? this.file.thumbnailUrl.endsWith('?thumbnail')
? (this.is === 'image' || this.is === 'video')
: true
: false;
},
background(): string {
return this.file.properties.avgColor && this.file.properties.avgColor.length == 3