File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 5555 "test:coverage" : " tsdx test --coverage" ,
5656 "lint" : " tsdx lint" ,
5757 "prepare" : " tsdx build" ,
58- "size" : " size-limit" ,
58+ "size" : " yarn build && size-limit" ,
5959 "analyze" : " size-limit --why" ,
6060 "release" : " np"
6161 },
Original file line number Diff line number Diff line change @@ -35,16 +35,17 @@ const Wizard: React.FC<WizardProps> = React.memo(
3535
3636 const doNextStep = React . useCallback ( async ( ) => {
3737 if ( hasNextStep . current && nextStepHandler . current ) {
38- try {
39- setIsLoading ( true ) ;
40- await nextStepHandler . current ( ) ;
41- setIsLoading ( false ) ;
42- nextStepHandler . current = null ;
43- goToNextStep ( ) ;
44- } catch ( error ) {
45- setIsLoading ( false ) ;
46- throw error ;
47- }
38+ setIsLoading ( true ) ;
39+ Promise . resolve ( nextStepHandler . current )
40+ . then ( ( ) => {
41+ setIsLoading ( false ) ;
42+ nextStepHandler . current = null ;
43+ return goToNextStep ( ) ;
44+ } )
45+ . catch ( ( error ) => {
46+ setIsLoading ( false ) ;
47+ throw error ;
48+ } ) ;
4849 } else {
4950 goToNextStep ( ) ;
5051 }
You can’t perform that action at this time.
0 commit comments