tldraw/packages/editor
Lu Wilson 07ec1e6ea1
Fix crash with zero length arrow (#2173)
This PR fixes a bug with zero length arrows.

Before:

![2023-11-07 at 15 17 47 - Harlequin
Mouse](https://github.com/tldraw/tldraw/assets/15892272/4c0b9609-f4f0-49cc-8575-ffd58973e81f)

After:

![2023-11-07 at 15 30 07 - Scarlet
Dinosaur](https://github.com/tldraw/tldraw/assets/15892272/af3188f1-c996-46e1-a2ff-48de31e0fc05)

Fixes #2166

### Change Type

- [x] `patch` — Bug fix

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Draw a rectangle.
2. Clone it.
3. Connect their centers with an arrow.
4. Hold control/command.
5. Drag one rectangle onto the other so they're in the exact same place.
6. Erase both rectangles (but NOT the invisible arrow).
7. Select all.
8. Hover the minimap.
9. Repeat but curve the arrow slightly before moving the rectangles
together.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fix a hyper niche arrow crash with zero length arrows.
2023-11-07 15:53:16 +00:00
..
api Zooming improvement (#2149) 2023-11-07 13:51:28 +00:00
src Fix crash with zero length arrow (#2173) 2023-11-07 15:53:16 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md Zooming improvement (#2149) 2023-11-07 13:51:28 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2023-10-17 14:39:34 +00:00
editor.css Tighten up editor ui (#2102) 2023-10-28 21:58:32 +00:00
LICENSE transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json bump prerelease from alpha to beta (#2148) 2023-11-06 11:57:12 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
setupTests.js Styles API follow-ups (#1636) 2023-06-24 13:46:04 +00:00
tsconfig.json tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00

tldraw/tldraw

Benchmark

To run the benchmarks

yarn workspace @tldraw/tldraw benchmark

Or

yarn workspace @tldraw/tldraw benchmark "file_search_string"