diff options
Diffstat (limited to 'toml/parser.ts')
| -rw-r--r-- | toml/parser.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toml/parser.ts b/toml/parser.ts index a7dd97750..c29f5a761 100644 --- a/toml/parser.ts +++ b/toml/parser.ts @@ -1,5 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import { existsSync } from "../fs/exists.ts"; +import { readFileStrSync } from "../fs/read_file_str.ts"; import { deepAssign } from "../util/deep_assign.ts"; import { pad } from "../strings/pad.ts"; @@ -542,7 +543,6 @@ export function parseFile(filePath: string): object { if (!existsSync(filePath)) { throw new Error("File not found"); } - const decoder = new TextDecoder(); - const strFile = decoder.decode(Deno.readFileSync(filePath)); + const strFile = readFileStrSync(filePath); return parse(strFile); } |
