fix Uncaught ReferenceError: initialState is not defined

This commit is contained in:
bgme 2023-08-22 05:26:59 +08:00
parent 9e38d55101
commit b38c9823a8

View file

@ -28,6 +28,8 @@ import { countableText } from '../util/counter';
import CharacterCounter from './character_counter';
import initialState from '../../../initial_state';
const maxChars = initialState.compose.max_characters;
const allowedAroundShortCode = '><\u0085\u0020\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\u0009\u000a\u000b\u000c\u000d';
@ -298,7 +300,7 @@ class ComposeForm extends ImmutablePureComponent {
</div>
<div className='character-counter__wrapper'>
<CharacterCounter max={500} text={this.getFulltextForCharacterCounting()} />
<CharacterCounter max={maxChars} text={this.getFulltextForCharacterCounting()} />
</div>
</div>
</div>