Skip to content

Commit

Permalink
fix: add obtain window before call method.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbericoD committed Jan 9, 2024
1 parent ca98855 commit 0660a68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useWindow/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function standardWindowBehavior(
id: string,
behavior: Behavior
): Promise<overwolf.windows.WindowIdResult> {
return new Promise((resolve, reject) => {
return new Promise(async (resolve, reject) => {
await obtainWindow(id);
overwolf.windows[behavior](id, (result) => {
if (result.success) resolve(result);
else reject(result);
Expand Down

0 comments on commit 0660a68

Please sign in to comment.