Skip to content

Commit

Permalink
Merge pull request #53 from fawaz-ahmed/fix-empty-line-check-ios
Browse files Browse the repository at this point in the history
fix empty line, short text issue for ios
  • Loading branch information
fawaz-ahmed authored Feb 7, 2022
2 parents 618d934 + 45d8d35 commit 3ec81b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/src/ReadMore.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const ReadMore = ({
_lineOfImpact.index = numberOfLines - 1;
if (Platform.OS === 'ios') {
const modifiedIndex = lines.findIndex((_line, index) => {
if (index < numberOfLines - 1) {
if (index < numberOfLines - 1 || !_line.text?.trimEnd?.()) {
return false;
}
return collapsedLines[numberOfLines - 1].text.includes(_line.text);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fawazahmed/react-native-read-more",
"version": "2.3.0",
"version": "2.3.1",
"description": "A simple react native library to show large blocks of text in a condensed manner with the ability to collapse and expand.",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 3ec81b8

Please sign in to comment.