Skip to content

Commit

Permalink
fix(ios): fix return type of TextInput.getValue method
Browse files Browse the repository at this point in the history
  • Loading branch information
ozonelmy authored and xuqingkuang committed Mar 2, 2020
1 parent adaca39 commit 5db3dac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ios/sdk/component/textinput/HippyTextViewManager.mm
Expand Up @@ -138,7 +138,12 @@ - (HippyShadowView *) shadowView {
if (![view isKindOfClass:[HippyBaseTextInput class]]) {
HippyLogError(@"Invalid view returned from registry, expecting HippyBaseTextInput, got: %@", view);
}
callback(@[[view value]]);
NSString *stringValue = [view value];
if (nil == stringValue) {
stringValue = @"";
}
NSArray *callBack = [NSArray arrayWithObject:[NSDictionary dictionaryWithObject:stringValue forKey:@"text"]];
callback(callBack);
}];
}

Expand Down

0 comments on commit 5db3dac

Please sign in to comment.