Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Feiyang1 committed Aug 12, 2020
1 parent 2df6b21 commit f1b0b44
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/analytics/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,21 @@ export function factory(
app: FirebaseApp,
installations: FirebaseInstallations
): FirebaseAnalytics {
if (isBrowserExtension()) {
throw ERROR_FACTORY.create(AnalyticsError.INVALID_ANALYTICS_CONTEXT);
}
if (!areCookiesEnabled()) {
throw ERROR_FACTORY.create(AnalyticsError.COOKIES_NOT_ENABLED);
}
if (!isIndexedDBAvailable()) {
throw ERROR_FACTORY.create(AnalyticsError.INDEXED_DB_UNSUPPORTED);
}
// Async but non-blocking.
validateIndexedDBOpenable().catch(error => {
throw ERROR_FACTORY.create(AnalyticsError.INVALID_INDEXED_DB_CONTEXT, {
errorInfo: error
});
});
// if (isBrowserExtension()) {
// throw ERROR_FACTORY.create(AnalyticsError.INVALID_ANALYTICS_CONTEXT);
// }
// if (!areCookiesEnabled()) {
// throw ERROR_FACTORY.create(AnalyticsError.COOKIES_NOT_ENABLED);
// }
// if (!isIndexedDBAvailable()) {
// throw ERROR_FACTORY.create(AnalyticsError.INDEXED_DB_UNSUPPORTED);
// }
// // Async but non-blocking.
// validateIndexedDBOpenable().catch(error => {
// throw ERROR_FACTORY.create(AnalyticsError.INVALID_INDEXED_DB_CONTEXT, {
// errorInfo: error
// });
// });

const analyticsId = app.options[ANALYTICS_ID_FIELD];
if (!analyticsId) {
Expand Down

0 comments on commit f1b0b44

Please sign in to comment.