From 88a7d40bea9e9162ee5b4a3e8f10520eb36c28ab Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Fri, 13 Sep 2013 18:24:24 +0200 Subject: [PATCH] send `null` instead of the empty string --- isso/js/app/isso.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index 87956cd..87a2c94 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -118,9 +118,9 @@ define(["lib/q", "lib/HTML", "helper/utils", "helper/identicons", "./api", "./fo // msgbox.scrollIntoView(false); msgbox.query("input[type=submit]").addEventListener("click", function(event) { forms.validate(msgbox) && api.create({ - author: msgbox.query("[name=author]").value, - email: msgbox.query("[name=email]").value, - website: msgbox.query("[name=website]").value, + author: msgbox.query("[name=author]").value || null, + email: msgbox.query("[name=email]").value || null, + website: msgbox.query("[name=website]").value || null, text: msgbox.query("textarea").value, parent: comment.id }) .then(function(rv) { @@ -143,9 +143,9 @@ define(["lib/q", "lib/HTML", "helper/utils", "helper/identicons", "./api", "./fo HTML.query("#isso-thread").add("div#isso-root").add(rootmsgbox); rootmsgbox.query("input[type=submit]").addEventListener("click", function(event) { forms.validate(rootmsgbox) && api.create({ - author: rootmsgbox.query("[name=author]").value, - email: rootmsgbox.query("[name=email]").value, - website: rootmsgbox.query("[name=website]").value, + author: rootmsgbox.query("[name=author]").value || null, + email: rootmsgbox.query("[name=email]").value || null, + website: rootmsgbox.query("[name=website]").value || null, text: rootmsgbox.query("textarea").value, parent: null }) .then(function(rv) {