From 1ecd48dcc2cddbf70dcbde5424f30c0ae390e4fa Mon Sep 17 00:00:00 2001 From: Kousuke Kawahira Date: Mon, 25 Dec 2023 17:55:36 +0900 Subject: [PATCH] s/thumbnailUrl/thumbnail.url/ --- storage/files.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/files.js b/storage/files.js index 6f487fd..005ca4a 100644 --- a/storage/files.js +++ b/storage/files.js @@ -796,14 +796,14 @@ class FileListView { _createItemEl(f, prefix) { let iconEl = mkEl('img', [], { 'className': 'thumbnail' }); - if (f.thumbnail && f.thumbnail.fetch) { + if (f.thumbnail && f.thumbnail.fetch && !f.thumbnail.url) { this.imageLoadQueue.add(iconEl, async el => { let url = URL.createObjectURL(await (await f.thumbnail.fetch()).blob()); el.addEventListener('load', ev => URL.revokeObjectURL(url), { once: true }); el.src = url; }); } else { - let turl = f.thumbnailUrl || (f.type == 'folder' || f.type == 'list' ? 'images/icon_folder.svg' : 'images/icon_file.svg'); + let turl = f.thumbnail && f.thumbnail.url || (f.type == 'folder' || f.type == 'list' ? 'images/icon_folder.svg' : 'images/icon_file.svg'); this.imageLoadQueue.add(iconEl, el => el.src = turl); }