Skip to content

Commit

Permalink
Check if element is a valid node
Browse files Browse the repository at this point in the history
  • Loading branch information
pinceladasdaweb committed Jun 19, 2016
1 parent 63b61f6 commit 369626c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/contact-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
return;
}

this.form = form.constructor.name === "Node" ? form : document.querySelector(form);
this.form = form instanceof Node ? form : document.querySelector(form);
this.endpoint = options.endpoint;

this.send();
Expand Down

0 comments on commit 369626c

Please sign in to comment.