Skip to content

Commit a059e0c

Browse files
committed
prettier
1 parent b560c8e commit a059e0c

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

packages/messaging/src/api.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,18 @@ export function getMessagingInWindow(app: FirebaseApp = getApp()): Messaging {
4949
// initialization phase for performance consideration. An error would be thrown latter for
5050
// developer's information. Developers can then choose to import and call `isSupported` for
5151
// special handling.
52-
isWindowSupported()
53-
.then(isSupported => {
52+
isWindowSupported().then(
53+
isSupported => {
5454
// If `isWindowSupported()` resolved, but returned false.
5555
if (!isSupported) {
5656
throw ERROR_FACTORY.create(ErrorCode.UNSUPPORTED_BROWSER);
5757
}
58-
}, _ => {
58+
},
59+
_ => {
5960
// If `isWindowSupported()` rejected.
6061
throw ERROR_FACTORY.create(ErrorCode.INDEXED_DB_UNSUPPORTED);
61-
});
62+
}
63+
);
6264
return _getProvider(getModularInstance(app), 'messaging').getImmediate();
6365
}
6466

@@ -74,16 +76,18 @@ export function getMessagingInSw(app: FirebaseApp = getApp()): Messaging {
7476
// initialization phase for performance consideration. An error would be thrown latter for
7577
// developer's information. Developers can then choose to import and call `isSupported` for
7678
// special handling.
77-
isSwSupported()
78-
.then(isSupported => {
79-
// If `isSwSupported()` resolved, but returned false.
80-
if (!isSupported) {
81-
throw ERROR_FACTORY.create(ErrorCode.UNSUPPORTED_BROWSER);
79+
isSwSupported().then(
80+
isSupported => {
81+
// If `isSwSupported()` resolved, but returned false.
82+
if (!isSupported) {
83+
throw ERROR_FACTORY.create(ErrorCode.UNSUPPORTED_BROWSER);
84+
}
85+
},
86+
_ => {
87+
// If `isSwSupported()` rejected.
88+
throw ERROR_FACTORY.create(ErrorCode.INDEXED_DB_UNSUPPORTED);
8289
}
83-
}, _ => {
84-
// If `isSwSupported()` rejected.
85-
throw ERROR_FACTORY.create(ErrorCode.INDEXED_DB_UNSUPPORTED);
86-
});
90+
);
8791
return _getProvider(getModularInstance(app), 'messaging-sw').getImmediate();
8892
}
8993

0 commit comments

Comments
 (0)