From 6ef6802c983dca7f9d72f0b2e4906d8f11a3c6a2 Mon Sep 17 00:00:00 2001 From: mrkutly Date: Sat, 4 Jun 2022 20:10:27 -0400 Subject: fix spidermonkey unexpected byte bug --- src/gleam_json_ffi.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gleam_json_ffi.mjs b/src/gleam_json_ffi.mjs index e34c0e2..115c503 100644 --- a/src/gleam_json_ffi.mjs +++ b/src/gleam_json_ffi.mjs @@ -145,7 +145,7 @@ function toSpidermonkeyUnexpectedByteError(err, json) { const line = Number(match[2]) const column = Number(match[3]) const position = getPositionFromMultiline(line, column, json) - const byte = toHex(err.message[position]) + const byte = toHex(json[position]) return new UnexpectedByte(byte, position) } -- cgit v1.2.3