Skip to content

Commit

Permalink
Throw error if call in node
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Jan 14, 2016
1 parent 1be46d0 commit ef4314b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
}
})(function () {
"use strict";

if (typeof window == "undefined" || typeof window.document == "undefined") {
return function() {
throw new Error( "Sortable.js requires a window with a document" );
}
}

var dragEl,
parentEl,
Expand Down

0 comments on commit ef4314b

Please sign in to comment.