Closed chrisbuttery closed 7 years ago
Hello, I'm just wondering if we could add this conditional to check the existence and length of dropTargetIds
.
If it doesn't exists or have and ids, do nothing.
I’ve run into this same issue. It’s very intermittent, and I have no idea what causes handleTopDrop
to get invoked when targetIds doesn’t exist, but whatever the cause, the result is we get the Uncaught Invariant Violation: Expected targetIds to be an array
error.
@darthtrevino Does the approach in this PR look safe as a way to harden the event handling, even if it doesn’t address the root cause?
This looks like it may be an initial state issue. this.dropTargetIds
is never set in the constructor. Would adding this.dropTargetIds = []
to the constructor solve this?
If this issue persists in the newest version, let me know, and we can work a solution out in the monorepo
This PR is a fix to address issue #32
Check
dropTargetIds
exists and has a length. If so, do something.