File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,13 @@ export class CommandsService implements ICommandsService {
2929 private $extensibilityService : IExtensibilityService ,
3030 private $optionsTracker : IOptionsTracker ,
3131 private $projectDataService : IProjectDataService ) {
32- const projectData = this . $projectDataService . getProjectData ( ) ;
32+ let projectData = null ;
33+ try {
34+ projectData = this . $projectDataService . getProjectData ( ) ;
35+ } catch ( err ) {
36+ this . $logger . trace ( `Error while trying to get project data. More info: ${ err } ` ) ;
37+ }
38+
3339 this . $options . setupOptions ( projectData ) ;
3440 }
3541
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export class Options {
3535 return ;
3636 }
3737
38- if ( projectData . isHmrEnabledByDefault ) {
38+ if ( projectData && projectData . isHmrEnabledByDefault ) {
3939 this . argv . bundle = this . argv . bundle !== undefined ? this . argv . bundle : "webpack" ;
4040 this . argv . hmr = ! this . argv . release ;
4141 }
You can’t perform that action at this time.
0 commit comments