mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 08:11:37 +01:00
Character counter fix
This commit is contained in:
parent
af5cb0f853
commit
4d2af0d664
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ const CharacterCounter = React.createClass({
|
||||||
mixins: [PureRenderMixin],
|
mixins: [PureRenderMixin],
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const diff = this.props.max - this.props.text.length;
|
const diff = this.props.max - this.props.text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span style={{ fontSize: '16px', cursor: 'default' }}>
|
<span style={{ fontSize: '16px', cursor: 'default' }}>
|
||||||
|
|
Loading…
Reference in a new issue