Avoid jsonifying undefined data

For example, when requesting a verification code, there is no JSON data
to send.
This commit is contained in:
lilia 2014-03-10 16:03:21 -07:00
parent 0fff393ebf
commit 820d67a0ba
1 changed files with 1 additions and 1 deletions

View File

@ -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) {