File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -150,19 +150,23 @@ class Workflow {
150150 }
151151
152152 async showBusy ( functionPromise , darkBackground = true ) {
153- if ( this . loader ) {
154- if ( darkBackground ) {
155- this . loader . classList . add ( "overlay" ) ;
156- } else {
157- this . loader . classList . remove ( "overlay" ) ;
153+ try {
154+ if ( this . loader ) {
155+ if ( darkBackground ) {
156+ this . loader . classList . add ( "overlay" ) ;
157+ } else {
158+ this . loader . classList . remove ( "overlay" ) ;
159+ }
160+ this . loader . classList . add ( "busy" ) ;
161+ }
162+ let result = await functionPromise ;
163+
164+ return result ;
165+ } finally {
166+ if ( this . loader ) {
167+ this . loader . classList . remove ( "busy" ) ;
158168 }
159- this . loader . classList . add ( "busy" ) ;
160- }
161- let result = await functionPromise ;
162- if ( this . loader ) {
163- this . loader . classList . remove ( "busy" ) ;
164169 }
165- return result ;
166170 }
167171
168172 async parseParams ( urlParams ) {
You can’t perform that action at this time.
0 commit comments