Skip to content

RM-343: Fix Create KB article page crashing on reload - #160

Merged
biast12 merged 1 commit into
masterfrom
RM-343
Oct 8, 2026
Merged

biast12 merged 1 commit into
masterfrom
RM-343

Conversation

@biast12

@biast12 biast12 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RM-343

Description

Fixes a crash when reloading the Create KB article page: TypeError: Cannot read properties of undefined (reading 'getMarkdown').

On a hard reload, React holds back showing the lazy-loaded page (up to 300 ms after the loading fallback). Tiptap's useEditor destroys the editor it created during render if the component hasn't mounted within 1 ms, and destroy() clears editor.storage. MarkdownEditor's value-sync effect then read storage.markdown on that destroyed editor and threw.

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

  • Try to create a KB
  • Reload the create page

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Avoids accessing a destroyed editor while synchronizing external Markdown value changes, preventing errors during editor teardown.
@biast12
biast12 requested a review from a team as a code owner October 4, 2026 21:57
@github-actions github-actions Bot added the type:bug Bug Fixes label Oct 4, 2026
@biast12
biast12 merged commit 57783e2 into master Oct 8, 2026
4 checks passed
@biast12
biast12 deleted the RM-343 branch October 8, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants