Skip to content

Commit

Permalink
Handle undefined runOptions by providing a default empty object in …
Browse files Browse the repository at this point in the history
…`resolveSystems` call
  • Loading branch information
pelikhan committed Sep 20, 2024
1 parent f0a8883 commit 7f96cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/promptcontext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export async function createPromptContext(
role: "system",
content: "",
}
for (const systemId of resolveSystems(prj, runOptions)) {
for (const systemId of resolveSystems(prj, runOptions ?? {})) {

Check failure on line 316 in packages/core/src/promptcontext.ts

View workflow job for this annotation

GitHub Actions / build

The optional chaining operator (??) has been added to runOptions in the resolveSystems function call. This change could potentially alter the behavior of the function if runOptions is undefined or null. Please ensure that this change is intended and that it won't introduce unexpected behavior. 🤔
checkCancelled(cancellationToken)

const system = prj.getTemplate(systemId)
Expand Down

0 comments on commit 7f96cda

Please sign in to comment.