diff --git a/js/phet-io/generatePhetioMacroAPI.js b/js/phet-io/generatePhetioMacroAPI.js index 3cd2f75e4..7371dc3c8 100644 --- a/js/phet-io/generatePhetioMacroAPI.js +++ b/js/phet-io/generatePhetioMacroAPI.js @@ -112,6 +112,7 @@ const generatePhetioMacroAPI = async ( repos, options ) => { const fullAPI = messageText; + await cleanup(); resolve( { // to keep track of which repo this is for @@ -120,7 +121,6 @@ const generatePhetioMacroAPI = async ( repos, options ) => { // For machine readability api: JSON.parse( fullAPI ) } ); - await cleanup(); } else if ( msg.type() === 'error' ) {