From 92705066236f2a585c3976e3ce4f1f03f717ed01 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 12 Sep 2018 20:46:36 +0200 Subject: [PATCH] Fix missing form method/action --- Views/FormView.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Views/FormView.js b/Views/FormView.js index a9ddd1d..cfe5c19 100644 --- a/Views/FormView.js +++ b/Views/FormView.js @@ -32,7 +32,7 @@ this.bind(); this.success = null; - this.lastSubmit = 0; + this.lastSubmit = 0; }; /** @@ -155,7 +155,7 @@ return this.getUniqueFormElements( Array.prototype.slice.call(inputs).concat( Array.prototype.slice.call(selects), - Array.prototype.slice.call(textareas), + Array.prototype.slice.call(textareas), Array.prototype.slice.call(external) ) ); @@ -163,7 +163,7 @@ /** * Get unique form elements - * + * * @param {Array} arr Form element array * * @return {Array} @@ -313,8 +313,8 @@ return; } - this.method = e.attributes['method'].value; - this.action = e.action; + this.method = typeof e.attributes['method'] !== 'undefined' ? e.attributes['method'].value : 'EMPTY'; + this.action = typeof e.action !== 'undefined' ? e.action : 'EMPTY'; const elements = this.getFormElements(), length = elements.length;