Skip to content

Commit be80f9f

Browse files
committed
Auto merge of #4377 - Turbo87:fix-download-graph, r=locks
DownloadGraph: Fix `extra` property access The attempted fix (e2398df) for the breakage caused by the Ember Data v4 update (072394d) caused this property path to no longer be valid. This commit should fix the issue. Resolves #4373
2 parents 94859b6 + 1b2c86a commit be80f9f

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

app/components/download-graph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function toChartData(data) {
7777
return { datasets: [] };
7878
}
7979

80-
let extra = data.content?.meta?.extra_downloads ?? [];
80+
let extra = data.meta?.extra_downloads ?? [];
8181

8282
let dates = {};
8383
let versions = new Map();

tests/components/download-graph-test.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -516,15 +516,13 @@ function exampleData() {
516516
{ version: FIVE_5, date: '2020-12-27', downloads: 15_713 },
517517
];
518518

519-
downloads.content = {
520-
meta: {
521-
extra_downloads: [
522-
{ date: '2020-12-30', downloads: 36_745 },
523-
{ date: '2020-12-29', downloads: 33_242 },
524-
{ date: '2020-12-28', downloads: 19_981 },
525-
{ date: '2020-12-27', downloads: 19_064 },
526-
],
527-
},
519+
downloads.meta = {
520+
extra_downloads: [
521+
{ date: '2020-12-30', downloads: 36_745 },
522+
{ date: '2020-12-29', downloads: 33_242 },
523+
{ date: '2020-12-28', downloads: 19_981 },
524+
{ date: '2020-12-27', downloads: 19_064 },
525+
],
528526
};
529527

530528
return downloads;

0 commit comments

Comments
 (0)