diff options
author | mrkutly <mark.sauer.utley@gmail.com> | 2022-06-04 20:10:27 -0400 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-06-11 18:39:10 +0100 |
commit | 6ef6802c983dca7f9d72f0b2e4906d8f11a3c6a2 (patch) | |
tree | 16f9cdcd4f6770f9633da5ea312106bb0dab4a09 | |
parent | 5b91d543fe78c623608dc48fcb06a11c37639721 (diff) | |
download | gleam_json-6ef6802c983dca7f9d72f0b2e4906d8f11a3c6a2.tar.gz gleam_json-6ef6802c983dca7f9d72f0b2e4906d8f11a3c6a2.zip |
fix spidermonkey unexpected byte bug
-rw-r--r-- | src/gleam_json_ffi.mjs | 2 |
1 files changed, 1 insertions, 1 deletions
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) } |