Make booleans stringable
Fixes "unsure of how to jsonify object of type boolean", e.g., supportsSms: false
This commit is contained in:
parent
7b0de6afe7
commit
0fff393ebf
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ function getString(thing) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStringable(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 === Object(thing) &&
|
||||||
(thing.__proto__ == StaticArrayBufferProto ||
|
(thing.__proto__ == StaticArrayBufferProto ||
|
||||||
thing.__proto__ == StaticUint8ArrayProto ||
|
thing.__proto__ == StaticUint8ArrayProto ||
|
||||||
|
|
Loading…
Reference in a new issue