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.
  • Loading branch information
dokmic authored and kowalczyk-krzysztof committed Jan 7, 2025
1 parent 3373e95 commit dbdf782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"properties": {
}
"properties": {}
}

0 comments on commit dbdf782

Please sign in to comment.