From 009e2069bfc995125720b35224a12a9a1c2ce570 Mon Sep 17 00:00:00 2001 From: Jaco Date: Sat, 27 Nov 2021 08:38:03 +0200 Subject: [PATCH] Allow for bigint values in JSON.stringify This change is as the result of a CI failure where `bigint` values are in-use - https://github.com/LedgerHQ/ledger-live-desktop/runs/4325584600?check_suite_focus=true#step:13:92 --- lib/SerializerAppend2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/SerializerAppend2.js b/lib/SerializerAppend2.js index 5dd42012..66111557 100644 --- a/lib/SerializerAppend2.js +++ b/lib/SerializerAppend2.js @@ -333,7 +333,9 @@ class Append2 { if (op.value !== null) { let content = op.value; if (typeof content !== 'string') { - content = JSON.stringify(content); + content = typeof content === 'bigint' + ? content.toString() + : JSON.stringify(content); } if (content.length < LARGE_CONTENT) { smallOutput.add(op.key, content);