Skip to content

Commit cb6527b

Browse files
committed
PR feedback
1 parent 0723e53 commit cb6527b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,8 +2392,12 @@ export class ClineProvider
23922392
// Modes
23932393

23942394
public async getModes(): Promise<{ slug: string; name: string }[]> {
2395-
const customModes = await this.customModesManager.getCustomModes()
2396-
return [...DEFAULT_MODES, ...customModes].map((mode) => ({ slug: mode.slug, name: mode.name }))
2395+
try {
2396+
const customModes = await this.customModesManager.getCustomModes()
2397+
return [...DEFAULT_MODES, ...customModes].map(({ slug, name }) => ({ slug, name }))
2398+
} catch (error) {
2399+
return DEFAULT_MODES.map(({ slug, name }) => ({ slug, name }))
2400+
}
23972401
}
23982402

23992403
public async getMode(): Promise<string> {

0 commit comments

Comments
 (0)