aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.js
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2021-09-09 21:53:51 +0100
committerLouis Pilfold <louis@lpil.uk>2021-09-09 21:53:51 +0100
commit3546644ebcd8112b089555e69dcd7a5dad5b434b (patch)
tree0525c7ac4274c3ef1a91907b75f3f1f30897d25e /src/gleam_stdlib.js
parentbb88a32d105da31e5cdd2ad713016c88b96ac0ce (diff)
downloadgleam_stdlib-3546644ebcd8112b089555e69dcd7a5dad5b434b.tar.gz
gleam_stdlib-3546644ebcd8112b089555e69dcd7a5dad5b434b.zip
Negative indexes in Erlang
Diffstat (limited to 'src/gleam_stdlib.js')
-rw-r--r--src/gleam_stdlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gleam_stdlib.js b/src/gleam_stdlib.js
index 9a80a6d..7ecbe11 100644
--- a/src/gleam_stdlib.js
+++ b/src/gleam_stdlib.js
@@ -521,7 +521,7 @@ export function decode_bit_string(data) {
export function decode_element(data, index) {
let error = (size) =>
decoder_error(
- `Tuple of at least ${size} element${size > 1 ? "s" : ""}`,
+ `Tuple of at least ${size} element${size == 1 ? "" : "s"}`,
data
);
if (!Array.isArray(data)) return error(index < 0 ? 1 : index + 1);