Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ios): add Invalid prop keyPath check #4060

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ios/sdk/base/HippyComponentData.mm
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ - (HippyPropBlock)propBlockForKey:(NSString *)name inDictionary:(NSMutableDictio
NSArray<NSString *> *parts = [keyPath componentsSeparatedByString:@"."];
if (parts) {
key = parts.lastObject;
HippyAssert(key, @"Invalid KeyPath, please check your prop define!");
parts = [parts subarrayWithRange:(NSRange) { 0, parts.count - 1 }];
}

Expand Down Expand Up @@ -242,7 +243,7 @@ - (HippyPropBlock)propBlockForKey:(NSString *)name inDictionary:(NSMutableDictio
[weakManager.bridge.eventDispatcher dispatchEvent:@"EventDispatcher" methodName:@"receiveNativeGesture" args:params];
} else {
[params setValue:body ?: @{} forKey:@"extra"];
[params setObject:key forKey:@"eventName"];
[params setObject:key ?: @"" forKey:@"eventName"];
[weakManager.bridge.eventDispatcher dispatchEvent:@"EventDispatcher" methodName:@"receiveUIComponentEvent"
args:params];
}
Expand Down
Loading