Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
espositos committed Aug 5, 2020
2 parents 80cce99 + 735b047 commit 621b1ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chatlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ChatLink {
static getToken(speakerData) {
let token = game.actors.tokens[speakerData.idToken]?.token;
if(!token)
token = canvas.tokens.placeables.find(t => t.actor._id === speakerData.idActor);
token = canvas.tokens.placeables.find(t => t.actor?._id === speakerData.idActor);

return token;
}
Expand Down Expand Up @@ -120,13 +120,13 @@ export class ChatLink {
}

static doSelectToken(event, user, token) {
let ctrlKey = event.ctrlKey;
if (!ChatLink.permissionToControl(user, token)) {
ChatLink.targetToken(event, user, token);
ChatLink.targetToken(event, user, token, ctrlKey);
return;
}

let shiftKey = event.shiftKey;
let ctrlKey = event.ctrlKey;

if (shiftKey) {
ChatLink.targetToken(event, user, token, ctrlKey);
Expand Down

0 comments on commit 621b1ec

Please sign in to comment.