bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
22.01k stars 1.97k forks source link

ReferenceError: document is not defined when reload page. #521

Closed jose920405 closed 4 years ago

jose920405 commented 7 years ago

captura de pantalla 2017-09-04 a la s 12 06 36 p m

Line 4 in dragula.js

var crossvent = require('crossvent');

Line 24 in custom-event/index.js

'function' === typeof document.createEvent ? function CustomEvent (type, params) {

This error happens each time when i reload a page with dragula import.

Splaktar commented 6 years ago

This is due to dragula depending on custom-event#1.0.0 and not 1.0.1 which fixed this in https://github.com/webmodules/custom-event/commit/58c6815304500488893e0a12a9489508be22775c.

Splaktar commented 6 years ago

Oh and custom-event@1.0.0 is a dependency of crossvent@1.5.4. Updating to crossvent@1.5.5 pulls in custom-event@1.0.1.