Skip to content

Commit

Permalink
[RNMobile] Fix: Add default value to format when start and end are un…
Browse files Browse the repository at this point in the history
…defined (#22741)

* add default vale to format when start and end are undefined

* revert lint changes
  • Loading branch information
dratwas authored May 29, 2020
1 parent b0458db commit c149be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rich-text/src/component/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class RichText extends Component {
}

onFormatChange( record ) {
const { start, end, activeFormats = [] } = record;
const { start = 0, end = 0, activeFormats = [] } = record;
const changeHandlers = pickBy( this.props, ( v, key ) =>
key.startsWith( 'format_on_change_functions_' )
);
Expand Down

0 comments on commit c149be2

Please sign in to comment.