Action

Type

Resolved On

Fix console.log variable bug in open.ts and close.ts fixing 2026-02-07

Fix console.log variable bug in open.ts and close.ts

Description

Critical bug in src/lib/open.ts and src/lib/close.ts where the goal() functions reference an undefined variable idea instead of the function parameter. This causes a ReferenceError when opening or closing goals.

Bug Details

src/lib/open.ts line 48

export async function goal(goal: string, owner: string) {
  console.log("Openning Idea: ", idea);  // ❌ 'idea' is not defined
  // ...
}

src/lib/close.ts line 52

export async function goal(goal: string, owner: string) {
  console.log("Closing Idea: ", idea);  // ❌ 'idea' is not defined
  // ...
}

Fix Required

Change idea to goal parameter and fix typos:

src/lib/open.ts:

console.log("Opening Goal: ", goal);

src/lib/close.ts:

console.log("Closing Goal: ", goal);

Impact

This bug will crash the application when users attempt to open or close goals via the API, preventing goal status updates from working correctly.

Affected Files

  • src/lib/open.ts
  • src/lib/close.ts