diff options
author | Lain Iwakura <lain@soykaf.club> | 2017-11-14 16:54:04 +0100 |
---|---|---|
committer | Lain Iwakura <lain@soykaf.club> | 2017-11-14 16:54:04 +0100 |
commit | dae8916544d0a9cee5d998b10bc5cf36f144b727 (patch) | |
tree | b08cdda6c95ddca1332d118ad2cb8241160f5f14 /app | |
parent | d11b1a1aa7a44e345f2458a712e6bbed85db267f (diff) |
Code style fixes.
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/compose/components/compose_form.js | 1 | ||||
-rw-r--r-- | app/validators/status_length_validator.rb | 2 |
2 files changed, 2 insertions, 1 deletions
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? |