Two real bugs from the first real test of R.1's pdf.js viewer:
1. getDocument(url) was called with a bare string. The installed
pdfjs-dist (6.4.299) requires an object - getDocument(src = {})
only ever reads src.url/src.data/src.range, so src.url ended up
undefined and pdf.js threw its own "expected either data, range, or
url parameter" error, exactly what was reported. Fixed:
getDocument({ url }).
2. Found while fixing #1: cleanup called pdfDoc.value.destroy(), but
destroy() lives on the loading task (getDocument()'s own synchronous
return value), not the resolved PDFDocumentProxy, which has no
destroy of its own - confirmed via the package's own type
definitions and a real Node script throwing "doc.destroy is not a
function" otherwise. Fixed by keeping the loading task and calling
loadingTask.destroy() instead.
Verified for real via pdf.js's own Node support, not just re-reading
the code: the buggy call shape reproduced the exact reported error
first, the fix loaded both the HSBC and RBC fixtures correctly, and
loading a second document after destroying the first (the real
document-switching scenario) succeeded cleanly.
Traced but could not find a code path connecting this to the separately
reported empty transactions table - that computed has no dependency on
the source panel's state. Fixed the confirmed bug; did not claim that
symptom is resolved.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| README.md | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| vite.config.js | ||
README.md
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.