Skip to content

Commit

Permalink
Fix an issue updating unlinked tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
StasTserk committed Aug 6, 2023
1 parent 6cc910c commit c38f0e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { Lifepath } from './items/lifepath';
import { BWSetting } from './actors/BWSetting';
import { Affiliation } from './items/affiliation';
import { TypeMissing } from '../types/index';
import { BWActor } from './actors/BWActor';
import { BWItem } from './items/item';

function factory(
entities: Record<string, typeof FoundryDocument>,
Expand Down Expand Up @@ -77,7 +79,7 @@ actorTypes['setting'] = BWSetting as typeof FoundryDocument;
export const actorConstructor = factory(
actorTypes,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Actor as any
BWActor as any
) as typeof Actor;

const itemTypes: Record<string, typeof FoundryDocument> = {};
Expand All @@ -97,4 +99,4 @@ itemTypes['affiliation'] = Affiliation as typeof FoundryDocument;
itemTypes['spell'] = Spell as typeof FoundryDocument;
itemTypes['lifepath'] = Lifepath as typeof FoundryDocument;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const itemConstructor = factory(itemTypes, Item as any) as typeof Item;
export const itemConstructor = factory(itemTypes, BWItem as any) as typeof Item;

0 comments on commit c38f0e2

Please sign in to comment.