@@ -36,13 +36,13 @@ function onFlattenProficiencyContextHook(html: JQuery, buttons: any[]) {
3636 icon : '<i class="fas fa-level-down-alt"></i>' ,
3737 condition : ( li : JQuery < HTMLLIElement > ) => {
3838 const id = li . data ( 'entity-id' ) as string ;
39- const actor = game . actors ?. get ( id ) ;
39+ const actor = ( game as Game ) . actors ?. get ( id ) ;
4040
4141 return actor ?. data . type === 'npc' && ! hasModifier ( actor ) ;
4242 } ,
4343 callback : async ( li : JQuery < HTMLLIElement > ) => {
4444 const id = li . data ( 'entity-id' ) as string ;
45- const actor = game . actors ?. get ( id ) ;
45+ const actor = ( game as Game ) . actors ?. get ( id ) ;
4646
4747 const level = parseInt ( actor ?. data . data [ 'details' ] . level . value ) ;
4848 await ( actor as any ) . addCustomModifier ( 'all' , modifierName , - level , 'untyped' ) ;
@@ -54,13 +54,13 @@ function onFlattenProficiencyContextHook(html: JQuery, buttons: any[]) {
5454 icon : '<i class="fas fa-level-up-alt"></i>' ,
5555 condition : ( li : JQuery < HTMLLIElement > ) => {
5656 const id = li . data ( 'entity-id' ) as string ;
57- const actor = game . actors ?. get ( id ) ;
57+ const actor = ( game as Game ) . actors ?. get ( id ) ;
5858
5959 return actor ?. data . type === 'npc' && hasModifier ( actor ) ;
6060 } ,
6161 callback : async ( li : JQuery < HTMLLIElement > ) => {
6262 const id = li . data ( 'entity-id' ) as string ;
63- const actor = game . actors ?. get ( id ) ;
63+ const actor = ( game as Game ) . actors ?. get ( id ) ;
6464
6565 await ( actor as any ) . removeCustomModifier ( 'all' , modifierName ) ;
6666 } ,
0 commit comments