Skip to content

Commit 7420f22

Browse files
committed
Set default empty string for apiModelId when undefined
Ensure apiModelId always has a string value by providing empty string fallback when undefined, matching the pattern used for other optional fields in the stateValues object. This prevents potential undefined values in the API configuration.
1 parent 302dc2d commit 7420f22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
13121312
apiConfiguration: providerSettings,
13131313
lastShownAnnouncementId: stateValues.lastShownAnnouncementId,
13141314
customInstructions: stateValues.customInstructions,
1315-
apiModelId: stateValues.apiModelId,
1315+
apiModelId: stateValues.apiModelId ?? "",
13161316
alwaysAllowReadOnly: stateValues.alwaysAllowReadOnly ?? false,
13171317
alwaysAllowReadOnlyOutsideWorkspace: stateValues.alwaysAllowReadOnlyOutsideWorkspace ?? false,
13181318
alwaysAllowWrite: stateValues.alwaysAllowWrite ?? false,

0 commit comments

Comments
 (0)