mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
fix null array bug for hook disable
This commit is contained in:
parent
dcf1ca7078
commit
dcbb2ef53e
1 changed files with 4 additions and 3 deletions
|
|
@ -1506,9 +1506,10 @@ export class Config {
|
|||
* This is used by the HookRegistry to filter out disabled hooks.
|
||||
*/
|
||||
getDisabledHooks(): string[] {
|
||||
// This will be populated from settings by the CLI layer
|
||||
// The core Config doesn't have direct access to settings
|
||||
return [];
|
||||
const hooks = this.hooks;
|
||||
if (!hooks) return [];
|
||||
const disabled = hooks['disabled'];
|
||||
return Array.isArray(disabled) ? (disabled as string[]) : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue