Skip to content

Commit

Permalink
[iOS] Fix userId nil throws "unrecognized selector sent to instance" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zenled authored Jun 9, 2022
1 parent 309729c commit c4ea075
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/Classes/FlutterSegmentPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ - (void)identify:(FlutterMethodCall*)call result:(FlutterResult)result {
NSDictionary *traits = call.arguments[@"traits"];
NSDictionary *options = call.arguments[@"options"];

userId = [userId isEqual:[NSNull null]]? nil: userId;

[[SEGAnalytics sharedAnalytics] identify: userId
traits: traits
options: options];
Expand Down

0 comments on commit c4ea075

Please sign in to comment.