mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 20:30:23 +00:00
fix: guard gemini schema null properties (#32332) (thanks @webdevtodayjason)
This commit is contained in:
@@ -21,6 +21,15 @@ describe("cleanSchemaForGemini", () => {
|
||||
expect(cleaned.properties).toEqual({});
|
||||
});
|
||||
|
||||
it("coerces array properties to an empty object", () => {
|
||||
const cleaned = cleanSchemaForGemini({
|
||||
type: "object",
|
||||
properties: [],
|
||||
}) as { properties?: unknown };
|
||||
|
||||
expect(cleaned.properties).toEqual({});
|
||||
});
|
||||
|
||||
it("coerces nested null properties while preserving valid siblings", () => {
|
||||
const cleaned = cleanSchemaForGemini({
|
||||
type: "object",
|
||||
|
||||
Reference in New Issue
Block a user