From 820d67a0ba41e5a04789ae8dada8b5d29c344677 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 10 Mar 2014 16:03:21 -0700 Subject: [PATCH] Avoid jsonifying undefined data For example, when requesting a verification code, there is no JSON data to send. --- js/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/helpers.js b/js/helpers.js index 48adf4da856d..432b4612a4ed 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -893,7 +893,7 @@ function doAjax(param) { } $.ajax(URL_BASE + URL_CALLS[param.call] + param.urlParameters, { type: param.httpType, - data: jsonThing(param.jsonData), + data: param.jsonData && jsonThing(param.jsonData), contentType: 'application/json; charset=utf-8', dataType: 'json', beforeSend: function(xhr) {