Skip to content

Use getState() instead of direct state access in getTitle()#28

Merged
thedhanawada merged 1 commit intomasterfrom
fix/use-getstate-encapsulation
Feb 19, 2026
Merged

Use getState() instead of direct state access in getTitle()#28
thedhanawada merged 1 commit intomasterfrom
fix/use-getstate-encapsulation

Conversation

@thedhanawada
Copy link
Copy Markdown
Contributor

Summary

  • `ForceCalendar.getTitle()` accessed `this.stateManager.state.config.locale` directly, bypassing the `getState()` encapsulation layer
  • After `destroy()` sets `state = null`, this would throw a TypeError
  • Changed to use `getState()` for consistency and safety

Test plan

  • Verify calendar title displays correct locale-formatted text
  • Run `npm test`

ForceCalendar.getTitle() accessed this.stateManager.state.config.locale
directly, bypassing the getState() encapsulation layer. After destroy()
sets state=null, this would throw. Use getState() for consistency and
safety.
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
force-calendar-interface Ready Ready Preview, Comment Feb 19, 2026 9:38am

@thedhanawada thedhanawada merged commit 84bcc88 into master Feb 19, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant