Browse Source

Fix fav/boosts hotkeys not working on detailed statuses

closed-social-glitch-2
Thibaut Girka 6 years ago
committed by ThibG
parent
commit
b13c34de3a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/javascript/flavours/glitch/features/status/index.js

+ 2
- 2
app/javascript/flavours/glitch/features/status/index.js View File

@ -127,7 +127,7 @@ export default class Status extends ImmutablePureComponent {
if (status.get('favourited')) { if (status.get('favourited')) {
this.props.dispatch(unfavourite(status)); this.props.dispatch(unfavourite(status));
} else { } else {
if (e.shiftKey || !favouriteModal) {
if ((e && e.shiftKey) || !favouriteModal) {
this.handleModalFavourite(status); this.handleModalFavourite(status);
} else { } else {
this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite })); this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite }));
@ -164,7 +164,7 @@ export default class Status extends ImmutablePureComponent {
if (status.get('reblogged')) { if (status.get('reblogged')) {
this.props.dispatch(unreblog(status)); this.props.dispatch(unreblog(status));
} else { } else {
if (e.shiftKey || !boostModal) {
if ((e && e.shiftKey) || !boostModal) {
this.handleModalReblog(status); this.handleModalReblog(status);
} else { } else {
this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog })); this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));

Loading…
Cancel
Save