File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/firebase_core/firebase_core_web/lib/src Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -202,8 +202,13 @@ class FirebaseCoreWeb extends FirebasePlatform {
202
202
List <FirebaseAppPlatform > get apps {
203
203
try {
204
204
return firebase.apps.map (_createFromJsApp).toList (growable: false );
205
- } catch (exception) {
206
- if (exception.toString ().contains ('of undefined' )) {
205
+ } catch (exception, stackTrace) {
206
+ final exceptionMessage = exception.toString ();
207
+ final stackTraceMessage = stackTrace.toString ();
208
+ const undefinedError = 'of undefined' ;
209
+
210
+ if (exceptionMessage.contains (undefinedError) ||
211
+ stackTraceMessage.contains (undefinedError)) {
207
212
// Keeps behavior consistent with other platforms which can access list without initializing app.
208
213
return [];
209
214
} else {
You can’t perform that action at this time.
0 commit comments