Skip to content

Commit

Permalink
Fix bug when checking for metaKey if there is no event object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexxie9952 committed Apr 2, 2024
1 parent bd0d2ea commit bdb7d58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions freeciv-web/src/main/webapp/javascript/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function FC_WRAP(value, range)
during an event click.
**************************************************************************/
const metaKey = (ev) => {
if (!ev) return false;
return (reconfig_metakey ? (!ev.ctrlKey && ev.shiftKey && ev.altKey) : ev.metaKey);
}

Expand Down

0 comments on commit bdb7d58

Please sign in to comment.