fix(extractor): use full cached meta to avoid invalid cache states

The lazy extraction does not specify meta the same way the stream
resolver does. this leads to partial meta being inserted in both the
short-term and long-term cache and consecutive requests have then
missing meta info like e.g. countries
This commit is contained in:
WebStreamr 2026-01-23 22:10:24 +00:00
parent 43e16f5bfa
commit a90d7b1cad
No known key found for this signature in database

View file

@ -84,8 +84,7 @@ export class ExtractorRegistry {
normalizedUrl,
{
...meta,
...(/* istanbul ignore next */lazyUrlResults[0]?.meta?.bytes && { bytes: lazyUrlResults[0]?.meta?.bytes }),
...(/* istanbul ignore next */lazyUrlResults[0]?.meta?.height && { height: lazyUrlResults[0]?.meta?.height }),
...lazyUrlResults[0]?.meta,
extractorId: meta?.extractorId ?? extractor.id,
},
);