Action | Type | Resolved On |
|---|---|---|
| Fix console.log variable bug in open.ts and close.ts | fixing | 2026-02-07 |
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.
export async function goal(goal: string, owner: string) {
console.log("Openning Idea: ", idea); // ❌ 'idea' is not defined
// ...
}
export async function goal(goal: string, owner: string) {
console.log("Closing Idea: ", idea); // ❌ 'idea' is not defined
// ...
}
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);
This bug will crash the application when users attempt to open or close goals via the API, preventing goal status updates from working correctly.
src/lib/open.tssrc/lib/close.ts