Skip to content

Commit

Permalink
cg's 1-liner fix to an "It's complicated" bug
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 24, 2018
1 parent 4ba69df commit 11a951d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions views/Match.js
Expand Up @@ -341,6 +341,7 @@ const ThingInst = connect(({opts}) => ({ lofiArt: opts.lofiArt }))(function Thin
onMouseOver: props.setInfo && (e => props.setInfo(e, obj, pos.x)),
onMouseOut: props.onMouseOut,
onClick: function() {
props.onMouseOut();
if (game.phase != etg.PlayPhase) return;
if (obj.type !== etg.Spell) {
if (game.targeting && game.targeting.filter(obj)) {
Expand Down Expand Up @@ -777,9 +778,7 @@ module.exports = class Match extends React.Component {
self.setCard(e, play, e.pageX);
}
},
onMouseOut: function() {
self.clearCard();
},
onMouseOut: () => self.clearCard(),
}),
);
}
Expand Down

0 comments on commit 11a951d

Please sign in to comment.