Skip to content

Commit

Permalink
fix: stop trying to parse nodes if there are none
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Aug 12, 2024
1 parent bf8f3e4 commit aac2433
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gptscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,10 @@ function getCmdPath(): string {

function parseBlocksFromNodes(nodes: any[]): Block[] {
const blocks: Block[] = []
if (!nodes) {
return blocks
}

for (const node of nodes) {
if (node.toolNode) {
if (!node.toolNode.tool.id) {
Expand Down

0 comments on commit aac2433

Please sign in to comment.