Skip to content

Commit

Permalink
plugin isEnabled fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonamy committed Jun 5, 2024
1 parent 642d495 commit 2ca557d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/browse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class extends Plugin {
}

isEnabled(): boolean {
return this.config.enabled
return this.config?.enabled
}

getName(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dalle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class extends Plugin {
}

isEnabled(): boolean {
return store.config.engines.openai.apiKey != null
return store.config?.engines.openai.apiKey != null
}

getName(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class extends Plugin {
}

isEnabled(): boolean {
return this.config.enabled && this.config.binpath != null
return this.config?.enabled && this.config?.binpath != null
}

getName(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/tavily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class extends Plugin {
}

isEnabled(): boolean {
return this.config.enabled && this.config.apiKey != null
return this.config?.enabled && this.config?.apiKey != null
}

getName(): string {
Expand Down

0 comments on commit 2ca557d

Please sign in to comment.