diff --git a/Sortable.js b/Sortable.js index 6f5c9c9..438dcf0 100644 --- a/Sortable.js +++ b/Sortable.js @@ -172,6 +172,10 @@ * @param {Object} [options] */ function Sortable(el, options) { + if (!(el && el.nodeType && el.nodeType === 1)) { + throw 'Sortable: `el` must be HTMLElement, and not ' + {}.toString.call(el); + } + this.el = el; // root element this.options = options = _extend({}, options);