} catch (e) {
// The `Notification` constructor is not available on Android.
// See https://bugs.chromium.org/p/chromium/issues/detail?id=481856
- if (e.name === "TypeError") {
- return;
+ if (e instanceof Error) {
+ if (e.name === "TypeError") {
+ return;
+ }
}
throw e;
catch (e) {
// The `Notification` constructor is not available on Android.
// See https://bugs.chromium.org/p/chromium/issues/detail?id=481856
- if (e.name === "TypeError") {
- return;
+ if (e instanceof Error) {
+ if (e.name === "TypeError") {
+ return;
+ }
}
throw e;
}