From 09be8bce0db2c76205f790f9d050661f59dd8a1e Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Thu, 22 Oct 2020 17:55:54 +0300 Subject: [PATCH] alert error if stremio-core failed to initialize --- src/App/App.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/App/App.js b/src/App/App.js index 7123c9887..6648f9ac6 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -24,7 +24,11 @@ const App = () => { const [shellInitialized, setShellInitialized] = React.useState(false); React.useEffect(() => { const onCoreStateChanged = () => { - setCoreInitialized(services.core.active); + if (services.core.error) { + alert(services.core.error); + } else if (services.core.active) { + setCoreInitialized(services.core.active); + } }; const onShellStateChanged = () => { setShellInitialized(services.shell.active || services.shell.error instanceof Error);