Skip to content

Commit aa12c00

Browse files
Fix hasNoChanges description comparison (#244521)
## Summary This PR fixes a bug where for dashboard listing page, some recent change made it so a newly created dashboard has description as `undefined` instead of an empty string, this leads to the content editor flyout always showing as having changes as the description comparison check wouldn't work properly. (cherry picked from commit 2cb23e1)
1 parent 2ed51c4 commit aa12c00

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/platform/packages/shared/content-management/content_editor/src/components/editor_flyout_content.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ export const ContentEditorFlyoutContent: FC<Props> = ({
8888
return arr1.every((tag: string, index) => tag === arr2[index]);
8989
};
9090

91+
const description = item.description || '';
92+
9193
return (
9294
item.title === form.title.value &&
93-
item.description === form.description.value &&
95+
description === form.description.value &&
9496
compareTags(itemTags, formTags)
9597
);
9698
};

0 commit comments

Comments
 (0)