Skip to content

Commit

Permalink
Removed ignore lint rule and doing the early return
Browse files Browse the repository at this point in the history
  • Loading branch information
samilabud committed Dec 4, 2023
1 parent 3a10688 commit 7c11e93
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,16 @@ function ComposerWithSuggestions({
}),
[blur, focus, prepareCommentAndResetComposer, replaceSelectionWithText],
);
// eslint-disable-next-line rulesdir/prefer-early-return

useEffect(() => {
if (value === '') {
setValue(convertToLTR(value));
}
const changeInputToLTR = (inputValue) => {
if (inputValue === '') {
setValue(convertToLTR(inputValue));
}
return true;
};

return changeInputToLTR(value);
}, [value]);

return (
Expand Down

0 comments on commit 7c11e93

Please sign in to comment.