Skip to content

Commit

Permalink
Fix telemetry CLI to write empty properties collection (elastic#205746)
Browse files Browse the repository at this point in the history
Follow-up of elastic#205613. Remove check blocking empty properties from
writing.

(cherry picked from commit aa8195c)
  • Loading branch information
dokmic committed Jan 7, 2025
1 parent 6d8b840 commit ffd1dbe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function writeToFileTask({ roots }: TaskContext) {
return roots.map((root) => ({
task: async () => {
const fullPath = path.resolve(process.cwd(), root.config.output);
if (root.mapping && Object.keys(root.mapping.properties).length > 0) {
if (root.mapping) {
// Sort first-level properties alphabetically
root.mapping.properties = Object.fromEntries(
Object.entries(root.mapping.properties).sort(([a], [b]) => {
Expand Down

0 comments on commit ffd1dbe

Please sign in to comment.