A stream media part whose base64 does not decode is a row with no Open, and the stream's other rows keep theirs #203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3730-a-stream-media-part-with-malformed-base6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3730
blobOf(web/src/lib/media.ts) decoded a base64 data URL withatob, which throwsInvalidCharacterErroron malformed base64. The throw escaped the file row's effect while the stream rendered, so a valid document drawn in the same pass lost its Open, and the console held the error.blobOfnow answers null for bytes that do not decode, as it does for a type outside the inert set. Such a document is a row with no Open, and every other row renders as it would without it.Regression
web/src/lib/StreamEntry.test.ts, "shows a document whose bytes do not decode with no Open, and the document beside it with its Open": a call answers with anapplication/pdfdocument whose data is%%%, beside a validtext/plaindocument.Before the fix (
npx vitest run src/lib/StreamEntry.test.tson master55c4d59cplus the test):After the fix, all 16 tests pass.
Golden set
None: the change draws no new scene and changes no snapshot under
web/e2e.Gates
sak-gate full, gate run 2, atbea784c4: passed (vitest 473/473, Playwright 799 passed, runner Playwright 10 passed).