Skip to content

Commit 7b2c01d

Browse files
f5iomikehardy
authored andcommitted
fix(auth, expo): lowercase String? in swift using .lowercased()
1 parent af6096e commit 7b2c01d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/auth/plugin/__tests__/__snapshots__/iosPlugin_openUrlFix.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public class AppDelegate: ExpoAppDelegate {
355355
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
356356
) -> Bool {
357357
// @generated begin @react-native-firebase/auth-openURL - expo prebuild (DO NOT MODIFY)
358-
if url.host.toLowerCase() == "firebaseauth" {
358+
if url.host?.lowercased() == "firebaseauth" {
359359
// invocations for Firebase Auth are handled elsewhere and should not be forwarded to Expo Router
360360
return false
361361
}

packages/auth/plugin/src/ios/openUrlFix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export function modifyObjcAppDelegate(contents: string): string | null {
155155
// NOTE: `mergeContents()` doesn't support newlines for the `anchor` regex, so we have to replace it manually
156156
const skipOpenUrlForFirebaseAuthBlockSwift: string = `\
157157
// @generated begin @react-native-firebase/auth-openURL - expo prebuild (DO NOT MODIFY)
158-
if url.host.toLowerCase() == "firebaseauth" {
158+
if url.host?.lowercased() == "firebaseauth" {
159159
// invocations for Firebase Auth are handled elsewhere and should not be forwarded to Expo Router
160160
return false
161161
}

0 commit comments

Comments
 (0)