mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-23 20:40:41 -07:00
Disallow unsafe type assertions (#18688)
This commit is contained in:
committed by
GitHub
parent
bce1caefd0
commit
fd65416a2f
@@ -56,6 +56,7 @@ function removeEmptyObjects(data: any): object {
|
||||
export function safeJsonStringifyBooleanValuesOnly(obj: any): string {
|
||||
let configSeen = false;
|
||||
return JSON.stringify(removeEmptyObjects(obj), (key, value) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
if ((value as Config) !== null && !configSeen) {
|
||||
configSeen = true;
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user