Skip to content

Commit

Permalink
fix(auth, web): catch hot reload & hot restart exception for web emul…
Browse files Browse the repository at this point in the history
…ator (#9601)
  • Loading branch information
russellwheatley committed Nov 16, 2022
1 parent af18b0b commit 3467483
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ class FirebaseAuthWeb extends FirebaseAuthPlatform {
// origin as a single string
delegate.useAuthEmulator('http://$host:$port');
} catch (e) {
throw getFirebaseAuthException(e);
final String code = (e as auth_interop.AuthError).code;
// this catches Firebase Error from web that occurs after hot reloading & hot restarting
if (code != 'auth/emulator-config-failed') {
throw getFirebaseAuthException(e);
}
}
}

Expand Down

0 comments on commit 3467483

Please sign in to comment.