Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Move hostedDomain null check into objective c
  • Loading branch information
ryanheise committed Aug 10, 2020
commit 87bc053559853b4e73ee50c3538dec731ba48c1c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
[GIDSignIn sharedInstance].clientID = plist[kClientIdKey];
[GIDSignIn sharedInstance].serverClientID = plist[kServerClientIdKey];
[GIDSignIn sharedInstance].scopes = call.arguments[@"scopes"];
[GIDSignIn sharedInstance].hostedDomain = call.arguments[@"hostedDomain"];
NSString *hostedDomain = call.arguments[@"hostedDomain"];
[GIDSignIn sharedInstance].hostedDomain = hostedDomain != (id)[NSNull null] ? hostedDomain : @"";
result(nil);
} else {
result([FlutterError errorWithCode:@"missing-config"
Expand Down