Update dragdrop.js

Some error handling.