Skip to content

Commit bae72c5

Browse files
author
aMarCruz
committed
v2.1.1
1 parent 2ddea0f commit bae72c5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5-
## \[2.1.0] - 2019-01-10
5+
## \[2.1.1] - 2019-01-10
6+
7+
Replaces the unpublished v2.1.0
68

79
### Added
810

@@ -17,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1719
### Fixed
1820

1921
- Linting errors in the markdown of the Changelog and Readme files.
22+
- Overflow in `lineInfoForLine`
2023

2124
## \[2.0.4] - 2018-09-14
2225

android/src/main/java/com/github/amarcruz/rntextsize/RNTextSizeModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void measure(@Nullable final ReadableMap specs, final Promise promise) {
162162

163163
Integer lineInfoForLine = conf.getIntOrNull("lineInfoForLine");
164164
if (lineInfoForLine != null && lineInfoForLine >= 0) {
165-
final int line = Math.max(lineInfoForLine, lineCount);
165+
final int line = Math.min(lineInfoForLine, lineCount);
166166
final WritableMap info = Arguments.createMap();
167167
info.putInt("line", line);
168168
info.putInt("start", layout.getLineStart(line));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-text-size",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Measure text accurately before laying it out and get font information from your App",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)