Skip to content

Commit cad9721

Browse files
committed
Fixed winboat not loading
1 parent 5841080 commit cad9721

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/renderer/lib/password.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import wordsListPath from "word-list";
1+
const wordList: typeof import("word-list") = require("word-list");
22

33
const fs: typeof import("fs") = require("node:fs");
44
const crypto: typeof import("crypto") = require("node:crypto");
@@ -21,6 +21,7 @@ function getRandomWordFrom(words: string[]) {
2121
}
2222

2323
export function readWordList(): string[] {
24-
const wordArray = fs.readFileSync(wordsListPath, "utf8").split("\n");
24+
const wordArray = fs.readFileSync(wordList.default, "utf8").split("\n");
25+
console.log(wordArray.filter(word => word.length >= 5).length);
2526
return wordArray.filter(word => word.length >= 5);
2627
}

0 commit comments

Comments
 (0)