Skip to content

Commit f14e1fe

Browse files
committed
fix: AppES PD alert
This happened because the return signature of get_app_icon was changed so that the MIME type can be returned when the uploaded or default icon is being used as a fallback. AppES was not updated to account for this change.
1 parent a504c6b commit f14e1fe

File tree

1 file changed

+2
-2
lines changed
  • src/backend/src/om/entitystorage

1 file changed

+2
-2
lines changed

src/backend/src/om/entitystorage/AppES.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,13 @@ class AppES extends BaseES {
289289
console.log('GOING TO');
290290
const svc_appIcon = this.context.get('services').get('app-icon');
291291
try {
292-
const stream = await svc_appIcon.get_icon_stream({
292+
const { stream, mime } = await svc_appIcon.get_icon_stream({
293293
app_uid: await entity.get('uid'),
294294
size: icon_size,
295295
});
296296
if ( ! stream ) throw Error('no stream');
297297
const buffer = await stream_to_buffer(stream);
298-
const data_url = `data:image/png;base64,${buffer.toString('base64')}`;
298+
const data_url = `data:${mime};base64,${buffer.toString('base64')}`;
299299
await entity.set('icon', data_url);
300300
console.log('DID IT')
301301
} catch (e) {

0 commit comments

Comments
 (0)