Skip to content

Commit

Permalink
throw an Error if no DOM element is given
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jul 16, 2013
1 parent 7a864ba commit 664630a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* Module dependencies.
*/
Expand Down Expand Up @@ -37,6 +36,7 @@ module.exports = function(el){
*/

function ClassList(el) {
if (!el) throw new Error('A DOM element reference is required');
this.el = el;
this.list = el.classList;
}
Expand Down

0 comments on commit 664630a

Please sign in to comment.