From dae8916544d0a9cee5d998b10bc5cf36f144b727 Mon Sep 17 00:00:00 2001 From: Lain Iwakura Date: Tue, 14 Nov 2017 16:54:04 +0100 Subject: [PATCH] Code style fixes. --- .../mastodon/features/compose/components/compose_form.js | 1 + app/validators/status_length_validator.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index 1b64f7fc7..b7a7447c4 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -19,6 +19,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { length } from 'stringz'; import { countableText } from '../util/counter'; import initialState from '../../../initial_state'; + const maxChars = initialState.max_chars; const messages = defineMessages({ diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb index 2be899740..888de5a40 100644 --- a/app/validators/status_length_validator.rb +++ b/app/validators/status_length_validator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class StatusLengthValidator < ActiveModel::Validator - MAX_CHARS = (ENV["MAX_CHARS"] || 500).to_i + MAX_CHARS = (ENV['MAX_CHARS'] || 500).to_i def validate(status) return unless status.local? && !status.reblog?