Skip to content
This repository has been archived by the owner on Jun 18, 2018. It is now read-only.

Conflict: Check for dropTargetIds in handleTopDrop() #33

Closed
wants to merge 1 commit into from

Conversation

chrisbuttery
Copy link

This PR is a fix to address issue #32

Check dropTargetIds exists and has a length. If so, do something.

@chrisbuttery
Copy link
Author

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.

@acusti
Copy link

acusti commented Feb 16, 2017

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?

@darthtrevino
Copy link
Member

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?

@darthtrevino
Copy link
Member

If this issue persists in the newest version, let me know, and we can work a solution out in the monorepo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants