Skip to content

Commit e32e52c

Browse files
fix: update not working when brand summary is empty field
1 parent 29474b2 commit e32e52c

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/generation/existingDesignSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function parseManagedDesignSystem(content: string): DesignSystemInput | n
8585

8686
if (
8787
!productName ||
88-
!brandSummary ||
88+
brandSummary === null ||
8989
!visualStyle ||
9090
!typographyScale ||
9191
!colorPalette ||

test/existingDesignSystem.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ describe("parseManagedDesignSystem", () => {
2222
expect(parseManagedDesignSystem(content)).toEqual(sampleDesign);
2323
});
2424

25+
it("accepts an empty brand section", () => {
26+
const content = createManagedSkillBody("Cursor", {
27+
...sampleDesign,
28+
brandSummary: ""
29+
});
30+
expect(parseManagedDesignSystem(content)).toEqual({
31+
...sampleDesign,
32+
brandSummary: ""
33+
});
34+
});
35+
2536
it("returns null when managed block is missing", () => {
2637
expect(parseManagedDesignSystem("# Manual only")).toBeNull();
2738
});

0 commit comments

Comments
 (0)