Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property of 'getAttribute' of null #154

Open
Z6n4 opened this issue Aug 9, 2016 · 3 comments
Open

Cannot read property of 'getAttribute' of null #154

Z6n4 opened this issue Aug 9, 2016 · 3 comments

Comments

@Z6n4
Copy link

Z6n4 commented Aug 9, 2016

Occurs in version 1.4.3 in drop.js, line 178
Uncaught TypeError: Cannot read property 'getAttribute' of null [drop.js:178]

The stack trace on my page starts with jQuery, into drop, and then DropInstance.
I did not think this was dependent on jQuery.

It is also failing on your demo page, when I try to "run" the first to blocks that have a run button.

@Z6n4
Copy link
Author

Z6n4 commented Aug 9, 2016

So i dug into this a bit further which was not too hard, and realized I probably provided a bad selector for the target option.

However, the error handling for this is not firing.
if (typeof this.target === 'undefined') {
throw new Error('Drop Error: You must provide a target.');
}

This is in the latest version of google chrome.

@Romanior
Copy link

Romanior commented Jan 24, 2017

you are likely have an Array of HTMLElements in the selector, not one.

@ghost
Copy link

ghost commented Mar 16, 2017

Can this be closed?

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

No branches or pull requests

2 participants