Skip to content

Commit

Permalink
Fix telemetry CLI to write empty properties collection (#205746)
Browse files Browse the repository at this point in the history
Follow-up of #205613. Remove check blocking empty properties from
writing.
  • Loading branch information
dokmic authored Jan 7, 2025
1 parent e8502c9 commit aa8195c
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 aa8195c

Please sign in to comment.