@@ -6,7 +6,7 @@ export class IntoTheOddActorSheet extends ActorSheet {
66
77 /** @override */
88 static get defaultOptions ( ) {
9- return mergeObject ( super . defaultOptions , {
9+ return foundry . utils . mergeObject ( super . defaultOptions , {
1010 classes : [ "intotheodd" , "sheet" , "actor" ] ,
1111 template : "systems/intotheodd/templates/actor/actor-sheet.html" ,
1212 width : 500 ,
@@ -38,10 +38,10 @@ export class IntoTheOddActorSheet extends ActorSheet {
3838 }
3939
4040 /** @override */
41- getData ( ) {
41+ async getData ( ) {
4242 const context = super . getData ( ) ;
4343 context . systemData = context . actor . system ;
44- context . enrichedBiography = TextEditor . enrichHTML ( context . systemData . biography , { async : false } ) ;
44+ context . enrichedBiography = await TextEditor . enrichHTML ( context . systemData . biography , { async : true } ) ;
4545 return context ;
4646 }
4747
@@ -87,7 +87,7 @@ export class IntoTheOddActorSheet extends ActorSheet {
8787 // Get the type of item to create.
8888 const type = header . dataset . type ;
8989 // Grab any data associated with this control.
90- const data = duplicate ( header . dataset ) ;
90+ const data = foundry . utils . duplicate ( header . dataset ) ;
9191 // Initialize a default name.
9292 const name = `New ${ type . capitalize ( ) } ` ;
9393 // Prepare the item object.
@@ -108,15 +108,16 @@ export class IntoTheOddActorSheet extends ActorSheet {
108108 * @param {Event } event The originating click event
109109 * @private
110110 */
111- _onRoll ( event ) {
111+ async _onRoll ( event ) {
112112 event . preventDefault ( ) ;
113113 const element = event . currentTarget ;
114114 const dataset = element . dataset ;
115115
116116 if ( dataset . roll ) {
117117 let roll = new Roll ( dataset . roll , this . actor . system ) ;
118118 let label = dataset . label ? `Rolling ${ dataset . label } ` : '' ;
119- roll . roll ( { async : false } ) . toMessage ( {
119+ await roll . evaluate ( ) ;
120+ roll . toMessage ( {
120121 speaker : ChatMessage . getSpeaker ( { actor : this . actor } ) ,
121122 flavor : label
122123 } ) ;
0 commit comments