From 0fff393ebfa2426d991cfaf809e6abd713eb1041 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 10 Mar 2014 15:47:37 -0700 Subject: [PATCH] Make booleans stringable Fixes "unsure of how to jsonify object of type boolean", e.g., supportsSms: false --- js/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/helpers.js b/js/helpers.js index 7bb8308e93..48adf4da85 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -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 ||