Crashing in isOver with empty targetId
See original GitHub issueDescribe the bug I have a connected drop target that is removed from the DOM, once something is dropped on to it.
Now since upgrading to v7.1.0
, I’m getting
Uncaught TypeError: Cannot read property '0' of undefined
in the monitor.isOver()
call inside the collect
function.
Somehow, it sees that the collect function is still called one more time, after the drop target has been removed (targetId
is undefined).
Interesting
- Downgrading back to
6.0.0
resolved the issue. - Also, using a short
setTimeout
wrapper around my callback that removed the drop target, resolved the issue.
Any idea what could cause that?
To Reproduce Steps to reproduce the behavior:
- Connect a Drop target, call
monitor.isOver()
incollect
- in the target, dispatch an action inside
drop(...)
that removes the drop target - See error
Expected behavior
There is no timing issue with isOver
and drop targets can be immediately removed.
Screenshots
Desktop (please complete the following information):
- OS: os x
- Browser chrome
- react-dnd / html5 backend
7.1.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
GM:HUDDrawTargetID - Garry's Mod Wiki
Called from GM:HUDPaint to draw player info when you hover over a player with your crosshair or mouse. Example. This code will turn...
Read more >Untitled
... Makinson cowell new york, Agence cupillard roanne 42, If empty php 0, ... thruxton predator exhaust uk, Dock street printing, Mh17 crash...
Read more >Untitled
Mt coot tha forest, Cid drama 24 feb 2012, Gr 32 nu isover. ... R1-1438s, Blank acrylic fridge magnets uk, Brandon flowers nfl...
Read more >Untitled
Touching the void amazon, Alarplasty cost thailand, Tvfix darwin, Lg t300 trucos ... Learjet 25 crash, Castello blasche misilmeri, Scriptie wijsbegeerte uu?
Read more >Diff - platform/frameworks/base - Google Git
Parcel); method public void writeToParcel(android.os.Parcel, int); field public static final int CRASHED = 1; // 0x1 - field public static final android.os.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be fixed by cfrank’s PR in a release today
Amazing, guys, thanks @cfrank