Skip to content

Conversation

@DayuanJiang
Copy link
Owner

Summary

  • Add XML validation in handleDisplayChart before calling onDisplayChart to prevent "d.setId is not a function" errors
  • Only update previousXML ref when validation passes to prevent state desync
  • Add console error logging for failed validations

Fixes #5

Test plan

  • Test with diagrams that previously caused "d.setId is not a function" errors
  • Verify streaming diagram updates still work correctly
  • Check console for validation error logs when invalid XML is generated

- Add XML validation in handleDisplayChart before calling onDisplayChart
- Only update previousXML ref when validation passes to prevent state desync
- Add console error logging for failed validations

Fixes #5
@vercel
Copy link

vercel bot commented Dec 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
next-ai-draw-io Building Building Preview Comment Dec 3, 2025 11:11am

@DayuanJiang DayuanJiang merged commit c0cd393 into main Dec 3, 2025
2 of 4 checks passed
@DayuanJiang DayuanJiang deleted the fix/validate-xml-before-drawio-load branch December 3, 2025 11:11
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.

setId is not a function

2 participants