jordanreger
jordanreger3y ago

split error when using std toml

here's the error:
$ deno run -A toml.ts
error: Uncaught (in promise) TypeError: subStr.split is not a function
const lines = subStr.split("\n");
^
at parse (https://deno.land/std@0.162.0/encoding/_toml/parser.ts:873:28)
at file:///C:/Users/jorda/crate/playground/toml.ts:5:13
$ deno run -A toml.ts
error: Uncaught (in promise) TypeError: subStr.split is not a function
const lines = subStr.split("\n");
^
at parse (https://deno.land/std@0.162.0/encoding/_toml/parser.ts:873:28)
at file:///C:/Users/jorda/crate/playground/toml.ts:5:13
2 Replies
Niterux
Niterux3w ago
im also having this issue does anyone know what this means
No description
Niterux
Niterux3w ago
oh wait nvm im dummy i was accidentally calling decode instead of decoder.decode so im guessing this error probably happens when its not given valid toml text