From 0660a683713f334b44d04d01001add3fec6cfb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alb=C3=A9rico=20Dias=20Barreto=20Filho?= Date: Tue, 9 Jan 2024 14:21:14 -0300 Subject: [PATCH] fix: add obtain window before call method. --- src/hooks/useWindow/wrappers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useWindow/wrappers.ts b/src/hooks/useWindow/wrappers.ts index ec57748..c5ec880 100644 --- a/src/hooks/useWindow/wrappers.ts +++ b/src/hooks/useWindow/wrappers.ts @@ -11,7 +11,8 @@ function standardWindowBehavior( id: string, behavior: Behavior ): Promise { - 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);