Skip to content

Commit

Permalink
fixed error with detecting GM syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Norc committed May 24, 2021
1 parent beb49f4 commit 29cb6d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cardhotbar/card-hotbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export class cardHotbar extends Hotbar {
if (!game.user.isGM) {
let socketMsg = {
type: "DISCARD",
playerID: game.users.find((el) => el.isGM && el.data.active).id,
playerID: game.users.find((el) => el.isGM && el.active).id,
cardID: macro.data.flags.world.cardID,
};
game.socket.emit("module.cardsupport", socketMsg);
Expand All @@ -440,7 +440,7 @@ export class cardHotbar extends Hotbar {
await ui.cardHotbar.populator.chbUnsetMacro(index);
} catch (e) {
console.error(e);
//console.debug ("Card Hotbar | Could not properly discard card from hand");
console.debug ("Card Hotbar | Could not properly discard card from hand");
}
},
},
Expand Down
4 changes: 1 addition & 3 deletions cardhotbar/scripts/card-hotbar-populator.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ export class cardHotbarPopulator {
if (!game.user.isGM) {
let socketMsg = {
type: "DISCARD",
playerID: game.users.find(
(el) => el.isGM && el.data.active
).id,
playerID: game.users.find((el) => el.isGM && el.active).id,
cardID: mCardId,
};
game.socket.emit("module.cardsupport", socketMsg);
Expand Down
2 changes: 1 addition & 1 deletion scripts/deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class Deck {
} else {
let msg = {
type: "UPDATESTATE",
playerID: game.users.find((el) => el.isGM && el.data.active).id,
playerID: game.users.find((el) => el.isGM && el.active).id,
deckID: this.deckID,
};
//@ts-ignore
Expand Down

0 comments on commit 29cb6d3

Please sign in to comment.