Skip to content

Commit

Permalink
move connect
Browse files Browse the repository at this point in the history
  • Loading branch information
amotarao committed Apr 27, 2021
1 parent 09813bc commit e3c6917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const main = async () => {
store.initialize();
const port = store.getPort();
await pie.initialize(app, port);
browser = await pie.connect(app, puppeteer);
};

const openWindow = async () => {
Expand All @@ -51,6 +50,8 @@ function closeWindow() {
}

const runDakoku = async (task: TaskType, options: DakokuOptions): Promise<dakoku.Result> => {
browser = await pie.connect(app, puppeteer);

if (!browser) {
throw new Error('browser is not initialized.');
}
Expand Down

0 comments on commit e3c6917

Please sign in to comment.