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:
parent
3b908ac453
commit
b956e2d605
File diff suppressed because it is too large
Load Diff
|
|
@ -77,7 +77,7 @@ function generatePageTypst(
|
|||
? analyzeProblem(p.a, p.b)
|
||||
: analyzeSubtractionProblem(p.minuend, p.subtrahend);
|
||||
const displayOptions = resolveDisplayForProblem(
|
||||
config.displayRules,
|
||||
config.displayRules as any, // Cast for backward compatibility with configs missing new fields
|
||||
meta,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue