mirror of
https://github.com/lennyzeltser/conversation-replay
synced 2026-06-21 13:55:53 +00:00
fix: parse meta.initialBlur field that was silently ignored
The initialBlur field is defined in DemoMeta, documented in README, present in schema.json, and consumed by the generator — but validateDemoMeta in parser.ts never read or forwarded it. Any YAML using `initialBlur` had the value silently dropped, so the generator always fell back to the default blur of 1px regardless of what was configured. Co-authored-by: HarshSheth1128 <harshsheth1128@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,13 @@ function validateDemoMeta(raw: unknown, filePath?: string): DemoMeta {
|
||||
result.speed = validateSpeedConfig(meta.speed, filePath);
|
||||
}
|
||||
|
||||
if (meta.initialBlur !== undefined) {
|
||||
if (typeof meta.initialBlur !== 'number' || !Number.isFinite(meta.initialBlur) || meta.initialBlur < 0) {
|
||||
throw new ParseError('meta.initialBlur must be a non-negative number', filePath);
|
||||
}
|
||||
result.initialBlur = meta.initialBlur;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user