Skip to content

Commit

Permalink
fix: no empty path for custom event
Browse files Browse the repository at this point in the history
  • Loading branch information
YoloMao committed Sep 29, 2024
1 parent 31f2648 commit df29fb1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions GrowingAutotrackerCore/Page/GrowingPageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ - (void)start {
- (void)growingEventManagerEventWillBuild:(GrowingBaseBuilder *_Nullable)builder {
if (builder) {
if ([builder isMemberOfClass:[GrowingCustomBuilder class]]) {
if (self.lastPagePath && self.lastPagePath.length > 0) {
((GrowingCustomBuilder *)builder).setPath(self.lastPagePath);
}
NSString *path = self.lastPagePath && self.lastPagePath.length > 0 ? self.lastPagePath.copy : @"/";
((GrowingCustomBuilder *)builder).setPath(path);
} else if ([builder isMemberOfClass:[GrowingPageBuilder class]]) {
GrowingPageBuilder *pageBuilder = (GrowingPageBuilder *)builder;
self.lastPagePath = pageBuilder.path;
Expand Down

0 comments on commit df29fb1

Please sign in to comment.