Skip to Content

parseMedia

parseMedia(value: unknown): PhotoMediaRef[] | null

Defined in: src/lib/db/memoryVault/types.ts:298 

Decode the stored media column. Returns null for “no photo behind this memory” (the column is null on every non-photo row) and tolerates a corrupt or unexpected payload by reading it as null too — a memory whose photo reference cannot be parsed is still a perfectly good memory, and losing the thumbnail is a better failure than losing the row.

Parameters

ParameterType

value

unknown

Returns

PhotoMediaRef[] | null

Last updated on