diff --git a/webui/src/components/display/blobs/AudioViewer.svelte b/webui/src/components/display/blobs/AudioViewer.svelte index 3636121..3734f6a 100644 --- a/webui/src/components/display/blobs/AudioViewer.svelte +++ b/webui/src/components/display/blobs/AudioViewer.svelte @@ -94,10 +94,7 @@ const label = `Annotation #${nextAnnotationIndex}`; region.update({ - attributes: { - "upend-address": entity, - label, - }, + attributes: { label }, } as any); // incorrect types, `update()` does take `attributes` } @@ -126,6 +123,12 @@ if (Object.values(region.data).length) { await putEntityAttribute(entity, "NOTE", region.data as IValue); } + + region.update({ + attributes: { + "upend-address": entity, + }, + } as any); } const updateAnnotationDebounced = debounce(updateAnnotation, 250); @@ -243,7 +246,7 @@ console.warn(`Failed to load peaks: ${e}`); const entity = await fetchEntity(address); if ( - (entity.get("FILE_SIZE") || 0) < 20_000_000 || + (parseInt(String(entity.get("FILE_SIZE"))) || 0) < 20_000_000 || confirm( $i18n.t( "File is large (>20 MiB) and UpEnd failed to load waveform from server. Generating the waveform locally may slow down your browser. Do you wish to proceed anyway?"