Skip to content

Commit

Permalink
fix #6523 (#6524)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinsuki authored and Gargron committed Feb 21, 2018
1 parent f69d7cb commit c1e77b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/mastodon/reducers/compose.js
Expand Up @@ -34,7 +34,7 @@ import uuid from '../uuid';
import { me } from '../initial_state';

const initialState = ImmutableMap({
mounted: false,
mounted: 0,
sensitive: false,
spoiler: false,
spoiler_text: '',
Expand Down Expand Up @@ -159,10 +159,10 @@ export default function compose(state = initialState, action) {
case STORE_HYDRATE:
return hydrate(state, action.state.get('compose'));
case COMPOSE_MOUNT:
return state.set('mounted', true);
return state.set('mounted', state.get('mounted') + 1);
case COMPOSE_UNMOUNT:
return state
.set('mounted', false)
.set('mounted', Math.max(state.get('mounted') - 1, 0))
.set('is_composing', false);
case COMPOSE_SENSITIVITY_CHANGE:
return state.withMutations(map => {
Expand Down

0 comments on commit c1e77b5

Please sign in to comment.