mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-21 23:40:44 -07:00
Disallow unsafe returns. (#19767)
This commit is contained in:
committed by
Sri Pasumarthi
parent
0c368578fa
commit
c3a1379851
@@ -40,6 +40,7 @@ export function tryParseJSON(input: string): object | null {
|
||||
|
||||
if (!Array.isArray(parsed) && Object.keys(parsed).length === 0) return null;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return parsed;
|
||||
} catch (_err) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user