Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

Commit

Permalink
Attempt 2 at working around webpack waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
MasicoreLord authored and MasicoreLord committed Feb 8, 2021
1 parent ecb8161 commit af67eb2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dom_shit.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ process.once('loaded', async () => {
ED.plugins = plugins;
c.log(`Plugins validated.`);

do {
// work-around to wait for webpack
while (true) {
await c.sleep(100);
}
while (!electron.webFrame.top.context.window.webpackJsonp);
if(electron.webFrame.top.context.window && electron.webFrame.top.context.window.webpackJsonp) break;
};


ED.webSocket = window._ws;

/* Add helper functions that make plugins easy to create */
Expand Down Expand Up @@ -193,7 +193,7 @@ process.once('loaded', async () => {
}
}
catch (err) {
c.error(`Failed to load BD plugins support: ${err}\n${err.stack}`);
c.warn(`Failed to load BD plugins support: ${err}\n${err.stack}`);
}
}

Expand Down

0 comments on commit af67eb2

Please sign in to comment.