@@ -150,23 +150,31 @@ export class BacktestSettingView {
150150 this . _panel . webview . html = this . getHtmlContent ( this . _panel . webview ) ;
151151
152152 if ( this . _currentProject && this . _currentProject . _id ) {
153- this . projectService . getProject ( this . _currentProject . _id ) . then ( projectDetails => {
154- this . datasetService . loadDatasetsInWorkspace ( ) . then ( datasets => {
153+ this . projectService . getProject ( this . _currentProject . _id )
154+ . then ( projectDetails => {
155+ this . datasetService . loadDatasetsInWorkspace ( )
156+ . then ( datasets => {
155157 this . _datasets = datasets ;
156158 this . _updateWebview ( projectDetails ?. lastConfig ) ;
157- } ) . catch ( dsError => vscode . window . showErrorMessage ( `Error loading datasets in show(): ${ dsError . message } ` ) ) ;
158- } ) . catch ( error => {
159+ } )
160+ . catch ( dsError => vscode . window . showErrorMessage ( `Error loading datasets in show(): ${ dsError . message } ` ) ) ;
161+ } )
162+ . catch ( error => {
159163 vscode . window . showErrorMessage ( `Error loading project data in show(): ${ error . message } ` ) ;
160- this . datasetService . loadDatasetsInWorkspace ( ) . then ( datasets => {
164+ this . datasetService . loadDatasetsInWorkspace ( )
165+ . then ( datasets => {
161166 this . _datasets = datasets ;
162167 this . _updateWebview ( undefined ) ;
163- } ) . catch ( dsError => vscode . window . showErrorMessage ( `Error loading datasets in show(): ${ dsError . message } ` ) ) ;
168+ } )
169+ . catch ( dsError => vscode . window . showErrorMessage ( `Error loading datasets in show(): ${ dsError . message } ` ) ) ;
164170 } ) ;
165171 } else {
166- this . datasetService . loadDatasetsInWorkspace ( ) . then ( datasets => {
172+ this . datasetService . loadDatasetsInWorkspace ( )
173+ . then ( datasets => {
167174 this . _datasets = datasets ;
168175 this . _updateWebview ( undefined ) ;
169- } ) . catch ( dsError => vscode . window . showErrorMessage ( `Error loading datasets in show(): ${ dsError . message } ` ) ) ;
176+ } )
177+ . catch ( dsError => vscode . window . showErrorMessage ( `Error loading datasets in show(): ${ dsError . message } ` ) ) ;
170178 }
171179
172180 this . _panel . reveal ( vscode . ViewColumn . Two ) ;
0 commit comments