aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gleam_json_ffi.mjs2
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)
}