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