From 369626c80dde864898f18dd559a5a482fc77914b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Rog=C3=A9rio?= Date: Sat, 18 Jun 2016 23:48:09 -0300 Subject: [PATCH] Check if element is a valid node --- public/js/contact-form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/contact-form.js b/public/js/contact-form.js index 852ee7e..3f4c4d8 100644 --- a/public/js/contact-form.js +++ b/public/js/contact-form.js @@ -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();