fix css not inserting on reload

This commit is contained in:
Araxeus
2021-05-06 18:40:56 +03:00
parent d4811b7901
commit 4b6fe78a1a

View File

@ -43,7 +43,7 @@ module.exports.fileExists = (path, callbackIfExists) => {
};
module.exports.injectCSS = (webContents, filepath, cb = undefined) => {
webContents.once("did-finish-load", async () => {
webContents.on("did-finish-load", async () => {
await webContents.insertCSS(fs.readFileSync(filepath, "utf8"));
if (cb) {
cb();