Skip to content

Commit

Permalink
Handle if plugin doesnt specify name (#42724)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed Feb 9, 2021
1 parent 7c397a5 commit 89f1a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/project.ts
Expand Up @@ -1142,8 +1142,8 @@ namespace ts.server {

protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map<any> | undefined) {
this.projectService.logger.info(`Enabling plugin ${pluginConfigEntry.name} from candidate paths: ${searchPaths.join(",")}`);
if (parsePackageName(pluginConfigEntry.name).rest) {
this.projectService.logger.info(`kipped loading plugin ${pluginConfigEntry.name} because only package name is allowed plugin name`);
if (!pluginConfigEntry.name || parsePackageName(pluginConfigEntry.name).rest) {
this.projectService.logger.info(`Skipped loading plugin ${pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)} because only package name is allowed plugin name`);
return;
}

Expand Down

0 comments on commit 89f1a88

Please sign in to comment.