Skip to content

Commit

Permalink
Mobile - AztecInputState - Don't notify caret change listeners if the…
Browse files Browse the repository at this point in the history
…re's no caret data (avoid triggering them with null values)
  • Loading branch information
Gerardo committed Mar 31, 2023
1 parent 45fff38 commit 4374115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native-aztec/src/AztecInputState.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const blurCurrentFocusedElement = () => {
* @param {Object} caret Caret's data.
*/
export const setCurrentCaretData = ( caret ) => {
if ( isFocused() ) {
if ( isFocused() && caret ) {
currentCaretData = caret;
notifyCaretChangeListeners();
}
Expand Down

0 comments on commit 4374115

Please sign in to comment.