question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

this.state.draggingElement is null on excalidraw-lib 0.10 & 0.11

See original GitHub issue

This one is a bit nasty, as it’s hard to give an exact reprodcuting path. Yet, we “consistenly” make excalidraw crash at some point with the code sandbox below 👇 https://codesandbox.io/s/excalidraw-forked-6i6i1d?file=/src/index.js

it give an error like this: Screenshot 2022-05-20 at 07 49 19 s

Arround this line (compiled)

(0,_utils__WEBPACK_IMPORTED_MODULE_34__.resetCursor)(this.canvas);
         this.setState((prevState) => ({
        draggingElement: null,
        elementType: "selection",
        selectedElementIds: Object.assign(Object.assign({}, prevState.selectedElementIds), { [this.state.draggingElement.id]: true }), // <--here
                        }));

To reproduce: there seems to be a “speed component” but tracing lines / arrows " fast-ish …just like that … drawing looks like this before crash Screenshot 2022-05-20 at 07 56 05

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eMerzhcommented, May 20, 2022
0reactions
eMerzhcommented, May 20, 2022

Cool, thanks for the fix 🎉 … i’ll see if i can wait for the next release 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found