Skip to content

Commit

Permalink
Merge pull request #47 from kandashi/0.2.51
Browse files Browse the repository at this point in the history
Update CTA.js
  • Loading branch information
kandashi authored Jun 10, 2021
2 parents 21dad7c + 9adf9c6 commit 344587d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CTA.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ class CTA {
CTAsocket.executeAsGM("removeById", token.id, animId, actorRemoval, fadeOut);
return;
}
let tokenFlags = Array.from(token.data.flags["Custom-Token-Animations"]?.anim) || []
let actorFlags = Array.from(token.actor.data.token.flags["Custom-Token-Animations"]?.anim) || []
let tokenFlags = Array.from(token.data.flags["Custom-Token-Animations"]?.anim || [])
let actorFlags = Array.from(token.actor.data.token.flags["Custom-Token-Animations"]?.anim || [])

let tokenAnimRemove = tokenFlags.findIndex(i => i.id === animId)
tokenFlags.splice(tokenAnimRemove, 1)
Expand Down Expand Up @@ -287,8 +287,8 @@ class CTA {
*/
static async PushFlags(token, flagData, pushActor) {
if (!game.user.isGM) return;
let tokenFlags = Array.from(token.data.flags["Custom-Token-Animations"]?.anim) || []
let actorFlags = Array.from(token.actor.data.token.flags["Custom-Token-Animations"]?.anim) || []
let tokenFlags = Array.from(token.data.flags["Custom-Token-Animations"]?.anim || [])
let actorFlags = Array.from(token.actor.data.token.flags["Custom-Token-Animations"]?.anim || [])


for (let flag of flagData) {
Expand Down

0 comments on commit 344587d

Please sign in to comment.