We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a3a34a commit 0dc4d51Copy full SHA for 0dc4d51
src/execution/execute.js
@@ -1095,13 +1095,13 @@ function flattenEPRs(
1095
): ExecutionPartialResultNP<mixed> {
1096
const errors = [];
1097
const data = [];
1098
- forEach((eprs: any), item => {
1099
- data.push(item[0]);
1100
- if (item[1] && item[1].length) {
1101
- errors.push(...item[1]);
+ for (let i = eprs.length - 1; i >= 0; i--) {
+ data[i] = eprs[i][0];
+ if (eprs[i][1] && eprs[i][1].length) {
+ errors.push(...eprs[i][1]);
1102
}
1103
- });
1104
- return [data, errors.length ? errors : null];
+ }
+ return [data, errors.length ? errors.reverse() : null];
1105
1106
1107
/**
0 commit comments