widhid: guard against errors restoring handlers
parent
4352cd0f29
commit
c1f8b1e4aa
|
|
@ -179,7 +179,11 @@
|
||||||
|
|
||||||
if(handlers)
|
if(handlers)
|
||||||
for(const handler of handlers)
|
for(const handler of handlers)
|
||||||
|
try{
|
||||||
Bangle.on(event as any, handler);
|
Bangle.on(event as any, handler);
|
||||||
|
}catch(e){
|
||||||
|
console.log(`couldn't restore "${event}" handler:`, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})()
|
})()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue