Merge pull request #2 from liliakai/master

Make booleans stringable
This commit is contained in:
Matt Corallo 2014-03-11 11:13:34 -07:00
commit 1c20dba67f

View file

@ -99,7 +99,7 @@ function getString(thing) {
}
function getStringable(thing) {
return (typeof thing == "string" || typeof thing == "number" ||
return (typeof thing == "string" || typeof thing == "number" || typeof thing == "boolean" ||
(thing === Object(thing) &&
(thing.__proto__ == StaticArrayBufferProto ||
thing.__proto__ == StaticUint8ArrayProto ||
@ -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) {