Commit 2fbf998
authored
Avoid duplicate data in downloaded report file (#6252)
When importing default-exported modules, the JavaScript runtime creates an object with both the properties of the exported object and a 'default' property containing the same data. In the case of the download functionality in the report, this results in the evaluation data being duplicated in the downloaded file (once at the root level and then again inside the 'default' property under the root level).
The fix in this commit avoids the problem by serializing the contents of the 'default' property if present and falling back to serializing the outer object otherwise.1 parent 0e6427c commit 2fbf998
File tree
1 file changed
+9
-1
lines changed- src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript/components
1 file changed
+9
-1
lines changedLines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | | - | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| |||
0 commit comments