Skip to content

Commit

Permalink
fix: unexpected end of JSON input
Browse files Browse the repository at this point in the history
  • Loading branch information
N0chteil committed Oct 22, 2023
1 parent 637f6c8 commit 38c23a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/managers/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as fs from "fs";
import * as path from "path";
import * as log from "electron-log";

import { JSONParse } from "../utils/json";
import getAppDataPath from "../utils/getAppDataPath";

import type { I18n } from "../../@types/zephra/I18n";
Expand All @@ -23,7 +24,7 @@ export class i18n {

if (!fs.existsSync(filePath)) return {};

return JSON.parse(fs.readFileSync(filePath, "utf8"));
return JSONParse(fs.readFileSync(filePath, "utf8"));
}

public static writeLangStrings(lang: string, strings: any) {
Expand Down

0 comments on commit 38c23a4

Please sign in to comment.