Getting some weird issues trying to unset flags. If I try to wipe flags on all tokens on the scene and then reload, there is usually 1 token that still has 1 flag on it. Seems like an async issue, but I can't see what I am doing wrong.
for (const tokenId in BloodNGuts.splatTokens) promises.push(BloodNGuts.splatTokens[tokenId].wipeFlags());
await Promise.all(promises);
public async wipeFlags(): Promise<PlaceableObject> {
this.wipeSplats();
this.tokenSplats = [];
if (this.token) return this.token.setFlag(MODULE_ID, 'splats', null);
}
Getting some weird issues trying to unset flags. If I try to wipe flags on all tokens on the scene and then reload, there is usually 1 token that still has 1 flag on it. Seems like an async issue, but I can't see what I am doing wrong.