Code style fixes.

This commit is contained in:
Lain Iwakura 2017-11-14 16:54:04 +01:00
parent d11b1a1aa7
commit dae8916544
2 changed files with 2 additions and 1 deletions

View file

@ -19,6 +19,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { length } from 'stringz'; import { length } from 'stringz';
import { countableText } from '../util/counter'; import { countableText } from '../util/counter';
import initialState from '../../../initial_state'; import initialState from '../../../initial_state';
const maxChars = initialState.max_chars; const maxChars = initialState.max_chars;
const messages = defineMessages({ const messages = defineMessages({

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class StatusLengthValidator < ActiveModel::Validator class StatusLengthValidator < ActiveModel::Validator
MAX_CHARS = (ENV["MAX_CHARS"] || 500).to_i MAX_CHARS = (ENV['MAX_CHARS'] || 500).to_i
def validate(status) def validate(status)
return unless status.local? && !status.reblog? return unless status.local? && !status.reblog?