From 77501625b9f8376a5ebf9458b772c0474cf375af Mon Sep 17 00:00:00 2001 From: Eduard Kyvenko Date: Wed, 12 Jul 2017 14:38:08 +0200 Subject: [PATCH] fix($ui): Initialize ui on the next tick --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 14ea947..a97b604 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,9 +27,11 @@ const ui = uiFactory( ); $(() => { - if (shouldShowUI()) { - ui.show(); - } + setTimeout(() => { + if (shouldShowUI()) { + ui.show(); + } + }, 0); }); export {