mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
fix: worker-detect crash on missing prompt parameter
detectWorkerTriggers() crashed with 'Cannot read properties of undefined (reading slice)' when called without text. Added null guard at function entry. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
1 parent
845acf82bb
commit
d5d5dfba87
1 file changed
+2
@@ -3211,6 +3211,8 @@ function detectWorkerTriggers(text: string): {
|
||||
confidence: number;
|
||||
context: string;
|
||||
} {
|
||||
if (!text) return { detected: false, triggers: [], confidence: 0, context: '' };
|
||||
|
||||
const detectedTriggers: WorkerTrigger[] = [];
|
||||
let totalMatches = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user