File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -123,21 +123,21 @@ export function factory(
123
123
app : FirebaseApp ,
124
124
installations : FirebaseInstallations
125
125
) : FirebaseAnalytics {
126
- // if (isBrowserExtension()) {
127
- // throw ERROR_FACTORY.create(AnalyticsError.INVALID_ANALYTICS_CONTEXT);
128
- // }
129
- // if (!areCookiesEnabled()) {
130
- // throw ERROR_FACTORY.create(AnalyticsError.COOKIES_NOT_ENABLED);
131
- // }
132
- // if (!isIndexedDBAvailable()) {
133
- // throw ERROR_FACTORY.create(AnalyticsError.INDEXED_DB_UNSUPPORTED);
134
- // }
135
- // // Async but non-blocking.
136
- // validateIndexedDBOpenable().catch(error => {
137
- // throw ERROR_FACTORY.create(AnalyticsError.INVALID_INDEXED_DB_CONTEXT, {
138
- // errorInfo: error
139
- // });
140
- // });
126
+ if ( isBrowserExtension ( ) ) {
127
+ throw ERROR_FACTORY . create ( AnalyticsError . INVALID_ANALYTICS_CONTEXT ) ;
128
+ }
129
+ if ( ! areCookiesEnabled ( ) ) {
130
+ throw ERROR_FACTORY . create ( AnalyticsError . COOKIES_NOT_ENABLED ) ;
131
+ }
132
+ if ( ! isIndexedDBAvailable ( ) ) {
133
+ throw ERROR_FACTORY . create ( AnalyticsError . INDEXED_DB_UNSUPPORTED ) ;
134
+ }
135
+ // Async but non-blocking.
136
+ validateIndexedDBOpenable ( ) . catch ( error => {
137
+ throw ERROR_FACTORY . create ( AnalyticsError . INVALID_INDEXED_DB_CONTEXT , {
138
+ errorInfo : error
139
+ } ) ;
140
+ } ) ;
141
141
142
142
const analyticsId = app . options [ ANALYTICS_ID_FIELD ] ;
143
143
if ( ! analyticsId ) {
You can’t perform that action at this time.
0 commit comments