main: specify enconding rather than converting buffer to string

This commit is contained in:
Dawid Dziurla committed 2020-03-05 23:26:36 +01:00
1 parent ae7db41acb
commit 8c2729a391
1 file changed
+1 -1
+1 -1
View File
@@ -5,7 +5,7 @@ const fs = require("fs")
function get_body(body) {
if (body.startsWith("file://")) {
body = body.replace("file://", "")
body = fs.readFileSync(body).toString()
body = fs.readFileSync(body, "utf8")
}
return body