diff options
Diffstat (limited to 'src/gleam_stdlib.mjs')
-rw-r--r-- | src/gleam_stdlib.mjs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gleam_stdlib.mjs b/src/gleam_stdlib.mjs index dac8d58..a612367 100644 --- a/src/gleam_stdlib.mjs +++ b/src/gleam_stdlib.mjs @@ -576,6 +576,9 @@ export function tuple_get(data, index) { } export function decode_list(data) { + if (Array.isArray(data)) { + return new Ok(List.fromArray(data)); + } return List.isList(data) ? new Ok(data) : decoder_error("List", data); } |