Skip to content

Commit 61c26f4

Browse files
committed
Bump to 0.5.1
1 parent 9dce14e commit 61c26f4

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ var TextTruncate = require('react-text-truncate'); // CommonJS or UMD
2929

3030

3131
## Changelog
32+
* 0.5.1 Hide `textTruncateChild` when nothing truncated
3233
* 0.5.0 Add request animation frame
33-
* 0.4.0 New property `textTruncateChild` for show more or others.
34+
* 0.4.0 New property `textTruncateChild` for show more or others
3435
* 0.3.7 Support CommonJS and UMD module loader
3536
* 0.3.5 Fix window resize issue
3637
* 0.3.4 supports Babel6

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
attrs,
203203
text
204204
),
205-
this.props.text == text ? null : this.props.textTruncateChild
205+
this.props.text === text ? null : this.props.textTruncateChild
206206
);
207207
}
208208
}]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-text-truncate",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Truncate text for React.js",
55
"main": "lib/index.js",
66
"scripts": {

src/TextTruncate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default class TextTruncate extends Component {
124124
return (
125125
<div>
126126
<div {...attrs}>{text}</div>
127-
{this.props.text == text ? null : this.props.textTruncateChild}
127+
{this.props.text === text ? null : this.props.textTruncateChild}
128128
</div>
129129
);
130130
}

0 commit comments

Comments
 (0)