diff options
author | pluralcafe-docker <git@plural.cafe> | 2018-11-27 00:54:40 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2018-11-27 00:54:40 +0000 |
commit | 384a602fd4117a73338542c59985f54acf5fb3f8 (patch) | |
tree | 2885959ad124784985daa7709cd645a5a8802a07 /app/javascript/flavours/glitch/reducers/statuses.js | |
parent | 72444f73ef4e04118f9c66b965c3c903cff8ef37 (diff) | |
parent | 6b6e633c095485f95350c4308a942192e5fe8806 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/statuses.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/statuses.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/reducers/statuses.js b/app/javascript/flavours/glitch/reducers/statuses.js index 617d96e5d..1beaf73e1 100644 --- a/app/javascript/flavours/glitch/reducers/statuses.js +++ b/app/javascript/flavours/glitch/reducers/statuses.js @@ -118,15 +118,15 @@ export default function statuses(state = initialState, action) { case FAVOURITE_REQUEST: return state.setIn([action.status.get('id'), 'favourited'], true); case FAVOURITE_FAIL: - return state.setIn([action.status.get('id'), 'favourited'], false); + return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'favourited'], false); case BOOKMARK_REQUEST: return state.setIn([action.status.get('id'), 'bookmarked'], true); case BOOKMARK_FAIL: - return state.setIn([action.status.get('id'), 'bookmarked'], false); + return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'bookmarked'], false); case REBLOG_REQUEST: return state.setIn([action.status.get('id'), 'reblogged'], true); case REBLOG_FAIL: - return state.setIn([action.status.get('id'), 'reblogged'], false); + return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'reblogged'], false); case STATUS_MUTE_SUCCESS: return state.setIn([action.id, 'muted'], true); case STATUS_UNMUTE_SUCCESS: |