mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 11:36:24 +01:00
focus can throw on Android, wrap it in a try/catch
This commit is contained in:
parent
bc763e2a19
commit
a70a38f481
@ -204,7 +204,9 @@ async function openClientFromNotif(event) {
|
||||
console.log("notificationclick: client has session open, showing room there");
|
||||
clientWithSession.navigate(roomURL);
|
||||
if ('focus' in clientWithSession) {
|
||||
await clientWithSession.focus();
|
||||
try {
|
||||
await clientWithSession.focus();
|
||||
} catch (err) { console.error(err); } // I've had this throw on me on Android
|
||||
}
|
||||
} else if (self.clients.openWindow) {
|
||||
console.log("notificationclick: no client found with session open, opening new window");
|
||||
|
Loading…
Reference in New Issue
Block a user