Catch blurhash decoding errors

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-08-12 10:11:46 +02:00
parent 70bb3f3dd7
commit 1280b66f41
3 changed files with 13 additions and 7 deletions

View File

@@ -9,6 +9,7 @@
</template>
<script lang="ts">
import { IMedia } from "@/types/media.model";
import { PropType } from "vue";
import { Component, Prop, Vue } from "vue-property-decorator";
import LazyImage from "../Image/LazyImage.vue";
@@ -31,7 +32,7 @@ const DEFAULT_PICTURE = {
},
})
export default class LazyImageWrapper extends Vue {
@Prop({ required: true })
@Prop({ required: false, type: Object as PropType<IMedia | null> })
picture!: IMedia | null;
get pictureOrDefault(): Partial<IMedia> {