fix(worksheets): add backward compatibility for displayRules in SmartModeControls
Use type casting to safely access borrowNotation and borrowingHints fields from formState.displayRules, which may not have these fields if coming from old worksheet configurations. Provides fallback to profile defaults when fields are missing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -77,7 +77,7 @@ function generatePageTypst(
|
|||||||
? analyzeProblem(p.a, p.b)
|
? analyzeProblem(p.a, p.b)
|
||||||
: analyzeSubtractionProblem(p.minuend, p.subtrahend);
|
: analyzeSubtractionProblem(p.minuend, p.subtrahend);
|
||||||
const displayOptions = resolveDisplayForProblem(
|
const displayOptions = resolveDisplayForProblem(
|
||||||
config.displayRules,
|
config.displayRules as any, // Cast for backward compatibility with configs missing new fields
|
||||||
meta,
|
meta,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user