Make booleans stringable

Fixes "unsure of how to jsonify object of type boolean",
e.g., supportsSms: false
This commit is contained in:
lilia 2014-03-10 15:47:37 -07:00
parent 7b0de6afe7
commit 0fff393ebf

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 ||