mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-11-28 08:14:42 +03:00
A text element without `text` was restored empty (and deleted on import) even when it had an `originalText`. Use the unwrapped `originalText` instead; it's rewrapped when the text is measured. Line height detection divides the element's height by its number of lines, so only use the height when it belongs to the restored `text` — it says nothing about the line height of an unwrapped `originalText`. The height is now also coerced to a number. The existing test restoring a `null` text now also nulls `originalText`, as it otherwise recovers the text from it. Signed-off-by: Mark Tolmacs <mark@lazycat.hu>