fix(hooks): guard against non-array API response to prevent .map crash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b9c83c1db7
commit
7e20e68e13
|
|
@ -335,7 +335,7 @@ export default function HooksPage() {
|
|||
queryFn: () => apiClient<HooksResponse>('/api/v1/agent/hooks'),
|
||||
});
|
||||
|
||||
const hooks = data?? [];
|
||||
const hooks = Array.isArray(data) ? data : [];
|
||||
|
||||
// Mutations ------------------------------------------------------------
|
||||
const createMutation = useMutation({
|
||||
|
|
|
|||
Loading…
Reference in New Issue