Skip to content

Commit e703cb7

Browse files
committed
Fix issue in Text with highlightString recursive functionality
1 parent 917a8df commit e703cb7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/text/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ export default class Text extends PureBaseComponent {
7474
return textParts;
7575
}
7676

77-
renderText(children = this.props.children) {
77+
renderText(children) {
7878
const {highlightString, highlightStyle} = this.props;
79-
79+
8080
if (!_.isEmpty(highlightString)) {
81-
81+
8282
if (_.isArray(children)) {
8383
return _.map(children, child => {
8484
return this.renderText(child);
@@ -103,7 +103,7 @@ export default class Text extends PureBaseComponent {
103103
render() {
104104
const color = this.getThemeProps().color || this.extractColorValue();
105105
const typography = this.extractTypographyValue();
106-
const {style, center, uppercase, ...others} = this.getThemeProps();
106+
const {style, center, uppercase, children, ...others} = this.getThemeProps();
107107
const {margins} = this.state;
108108
const textStyle = [
109109
this.styles.container,
@@ -117,7 +117,7 @@ export default class Text extends PureBaseComponent {
117117

118118
return (
119119
<RNText {...others} style={textStyle} ref={this.setRef}>
120-
{this.renderText()}
120+
{this.renderText(children)}
121121
</RNText>
122122
);
123123
}

0 commit comments

Comments
 (0)