diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index f626b021..911616b3 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -73,7 +73,7 @@
{ const photo = this.list[index - this.globalAnchor]; - if (photo.flag & this.c.FLAG_IS_VIDEO) return thumbEl; + if (!photo || photo.flag & this.c.FLAG_IS_VIDEO) return thumbEl; return this.thumbElem(photo) || thumbEl; }); @@ -489,9 +487,7 @@ export default class Viewer extends Mixins(GlobalMixin) { /** Get element for thumbnail if it exists */ private thumbElem(photo: IPhoto): HTMLImageElement | undefined { if (!photo) return; - const elems = document.querySelectorAll( - `.memories-thumb-${photo.key || photo.fileid}` - ); + const elems = document.querySelectorAll(`.memories-thumb-${photo.key}`); if (elems.length === 0) return; if (elems.length === 1) return elems[0] as HTMLImageElement; diff --git a/src/components/frame/Photo.vue b/src/components/frame/Photo.vue index e319c3a2..286f01f5 100644 --- a/src/components/frame/Photo.vue +++ b/src/components/frame/Photo.vue @@ -29,7 +29,7 @@ >