mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Make booleans stringable
Fixes "unsure of how to jsonify object of type boolean", e.g., supportsSms: false
This commit is contained in:
+1
-1
@@ -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 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user