{
"name": "TypeError",
"message": "runner.distanceDonations.reduce is not a function",
"stack": "TypeError: runner.distanceDonations.reduce is not a function\n at PdfController.mapCertificatRunnersGroupNames (/app/app/controllers/PdfController.js:99:72)\n at PdfController.generateCertificates (/app/app/controllers/PdfController.js:69:24)\n at ActionMetadata.callMethod (/app/node_modules/routing-controllers/metadata/ActionMetadata.js:110:48)\n at /app/node_modules/routing-controllers/RoutingControllers.js:100:140\n at processTicksAndRejections (internal/process/task_queues.js:93:5)"
}
this is the problem (src/controllers/PdfController.ts:100):
```ts
runner.donationPerDistanceTotal = runner.distanceDonations.reduce(function (sum, current) {
return sum + current.amountPerDistance;
}, 0);
runner.donationTotal = runner.distanceDonations.reduce(function (sum, current) {
return sum + current.amount;
}, 0);
```
throws this error:
```
{
"name": "TypeError",
"message": "runner.distanceDonations.reduce is not a function",
"stack": "TypeError: runner.distanceDonations.reduce is not a function\n at PdfController.mapCertificatRunnersGroupNames (/app/app/controllers/PdfController.js:99:72)\n at PdfController.generateCertificates (/app/app/controllers/PdfController.js:69:24)\n at ActionMetadata.callMethod (/app/node_modules/routing-controllers/metadata/ActionMetadata.js:110:48)\n at /app/node_modules/routing-controllers/RoutingControllers.js:100:140\n at processTicksAndRejections (internal/process/task_queues.js:93:5)"
}
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
this is the problem (src/controllers/PdfController.ts:100):
throws this error: