mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
error events handled properly in stremio core service
This commit is contained in:
parent
143a211625
commit
9b37038d5a
1 changed files with 2 additions and 2 deletions
|
|
@ -7,17 +7,17 @@ function StremioCore() {
|
|||
let starting = false;
|
||||
let containerService = null;
|
||||
let events = new EventEmitter();
|
||||
events.on('error', () => { });
|
||||
|
||||
function onStateChanged() {
|
||||
events.emit('stateChanged');
|
||||
}
|
||||
function start() {
|
||||
if (active || error !== null || starting) {
|
||||
if (active || error instanceof Error || starting) {
|
||||
return;
|
||||
}
|
||||
|
||||
starting = true;
|
||||
events.on('error', () => { });
|
||||
init()
|
||||
.then(() => {
|
||||
if (starting) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue