Fix max length prop to be a number (#1558)

This commit is contained in:
Elias Nahum 2018-03-30 13:40:39 +03:00 committed by GitHub
parent 6698dbf678
commit a4744e46dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ function mapStateToProps(state, ownProps) {
currentUserId: getCurrentUserId(state),
deactivatedChannel,
files: currentDraft.files,
maxMessageLength: (config && config.MaxPostSize) || MAX_MESSAGE_LENGTH,
maxMessageLength: (config && parseInt(config.MaxPostSize || 0, 10)) || MAX_MESSAGE_LENGTH,
theme: getTheme(state),
uploadFileRequestStatus: state.requests.files.uploadFiles.status,
value: currentDraft.draft,