mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 07:50:21 +00:00
fix(hooks): harden workspace hook loading
This commit is contained in:
@@ -87,6 +87,9 @@ function resolveHookForToggle(
|
||||
);
|
||||
}
|
||||
if (opts?.requireEligible && !hook.eligible) {
|
||||
if (hook.disabled && hook.requirementsSatisfied) {
|
||||
return hook;
|
||||
}
|
||||
throw new Error(`Hook "${hookName}" is not eligible (missing requirements)`);
|
||||
}
|
||||
return hook;
|
||||
|
||||
Reference in New Issue
Block a user