1
0
Fork 0

widhid: guard against errors restoring handlers

master
Rob Pilling 2023-05-08 22:06:01 +01:00
parent 4352cd0f29
commit c1f8b1e4aa
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}
}
};
})()