Skip to content

Commit 63cac7b

Browse files
[9.2] Fix hasNoChanges description comparison (#244521) (#244769)
# Backport This will backport the following commits from `main` to `9.2`: - [Fix hasNoChanges description comparison (#244521)](#244521) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Krzysztof Kowalczyk","email":"krzysztof.kowalczyk@elastic.co"},"sourceCommit":{"committedDate":"2025-12-01T13:32:44Z","message":"Fix hasNoChanges description comparison (#244521)\n\n## Summary\n\nThis PR fixes a bug where for dashboard listing page, some recent change\nmade it so a newly created dashboard has description as `undefined`\ninstead of an empty string, this leads to the content editor flyout\nalways showing as having changes as the description comparison check\nwouldn't work properly.","sha":"2cb23e19ffaa58eb93928163179df6c1214e3773","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:SharedUX","backport:all-open","v9.3.0"],"title":"Fix hasNoChanges description comparison","number":244521,"url":"https://github.com/elastic/kibana/pull/244521","mergeCommit":{"message":"Fix hasNoChanges description comparison (#244521)\n\n## Summary\n\nThis PR fixes a bug where for dashboard listing page, some recent change\nmade it so a newly created dashboard has description as `undefined`\ninstead of an empty string, this leads to the content editor flyout\nalways showing as having changes as the description comparison check\nwouldn't work properly.","sha":"2cb23e19ffaa58eb93928163179df6c1214e3773"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244521","number":244521,"mergeCommit":{"message":"Fix hasNoChanges description comparison (#244521)\n\n## Summary\n\nThis PR fixes a bug where for dashboard listing page, some recent change\nmade it so a newly created dashboard has description as `undefined`\ninstead of an empty string, this leads to the content editor flyout\nalways showing as having changes as the description comparison check\nwouldn't work properly.","sha":"2cb23e19ffaa58eb93928163179df6c1214e3773"}}]}] BACKPORT--> Co-authored-by: Krzysztof Kowalczyk <krzysztof.kowalczyk@elastic.co>
1 parent 37ee1a5 commit 63cac7b

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)