Repository navigation
v1.1.1 - Fix fileMatch runtime error
Bug Fix
Fixes undefined is not object (evaluating fileMatch[1].replace) runtime error in chat.message hook.
Root Cause
When .match() is used with a regex that has the global flag g, JavaScript returns an array of complete matches without capture groups. This caused fileMatch[1] to be undefined.
Fix
Changed to matchAll() which correctly returns capture groups, consistent with session-manager.ts.
Files Changed
- src/episode-detector.ts lines 99-120: .match() to matchAll() + for...of loop