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 9ce4d26 commit 2f4482eCopy full SHA for 2f4482e
src/execution/execute.js
@@ -1100,13 +1100,13 @@ function flattenEPRs(
1100
): ExecutionPartialResultNP<mixed> {
1101
const errors = [];
1102
const data = [];
1103
- forEach((eprs: any), item => {
1104
- data.push(item[0]);
1105
- if (item[1] && item[1].length) {
1106
- 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]);
1107
}
1108
- });
1109
- return [data, errors.length ? errors : null];
+ }
+ return [data, errors.length ? errors.reverse() : null];
1110
1111
1112
/**
0 commit comments