mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-08 10:47:48 +08:00
Each auto-save takes a thumbnail, and draw.io's SVG gets a new random id every time, so latestSvg changed and the diagram context rendered again. getThumbnailSvg was a new function on every render, the auto-save depends on it, so the next save was scheduled a second later: a chat with some diagrams was saved and exported once a second for as long as it was open. getThumbnailSvg (and the export helper it uses) now keep one identity; they read refs only. Found by hand in the production build; the new e2e test fails without the fix on a production build (as CI runs it).