Skip to content

Commit 94602e5

Browse files
committed
fix: broken image for thumbs if they don't exist
1 parent 8f87a18 commit 94602e5

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/widgets/PrintStatusWidget.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@
4646
<div class="filename ml-1" v-if="filename">gcodes/{{ filename }}</div>
4747
</div>
4848
</v-col>
49-
<v-col cols="auto" class="d-none d-sm-flex">
49+
<v-col cols="auto" class="d-none d-sm-flex" v-if="thumbnail && printerPrinting">
5050
<img
51-
v-if="thumbnail && printerPrinting"
5251
class="print-thumb"
5352
:src="thumbnail.data"
5453
/>

src/store/socket/getters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const getters: GetterTree<SocketState, RootState> = {
120120
})
121121
}
122122

123-
if (thumb) {
123+
if (thumb && thumb.data) {
124124
thumb.data = 'data:image/gif;base64,' + thumb.data
125125
}
126126
return thumb

0 commit comments

Comments
 (0)