diff --git a/services/web/frontend/js/features/typst-preview/components/typst-wasm-preview.tsx b/services/web/frontend/js/features/typst-preview/components/typst-wasm-preview.tsx index aab70b3dc5..4d830e27b7 100644 --- a/services/web/frontend/js/features/typst-preview/components/typst-wasm-preview.tsx +++ b/services/web/frontend/js/features/typst-preview/components/typst-wasm-preview.tsx @@ -71,11 +71,12 @@ const TypstWasmPreview: FC = () => { dataToRender = null try { - await renderer.runWithSession(async session => { - session.manipulateData({ action: 'reset', data }) - // Use session.renderToSvg (NOT renderer.renderToSvg with renderSession) - // to avoid double-aliasing the same Rust object inside runWithSession - await session.renderToSvg({ container }) + // Use RenderByContentOptions: pass artifactContent directly instead of + // using runWithSession + manipulateData, which causes Rust aliasing errors + await renderer.renderToSvg({ + format: 'vector', + artifactContent: data, + container, }) pendingVectorRef.current = null setStatus('ready')