diff --git a/routes/operations.js b/routes/operations.js index d1ee846..4d901be 100644 --- a/routes/operations.js +++ b/routes/operations.js @@ -905,7 +905,7 @@ module.exports = function(pool) { for (const unit of units) { const incr = await resolveIncrs(client, ctx, unit.where, excludeClause, req.body); // no rows, or already at the target — nothing to write for this slice - if (incr.value === 0 && incr.units === 0) { skipped.push(...unit.slices); continue; } + if (incr.value === 0 && incr.units === 0) { for (const s of unit.slices) skipped.push(s); continue; } applied++; const loggedSlice = unit.slices.length === 1 ? unit.slices[0] : unit.slices; @@ -933,7 +933,7 @@ module.exports = function(pool) { for (const r of result.rows) { if (r.pf_logid != null) sqlByLogId.set(r.pf_logid, sql); } - allRows.push(...result.rows); + for (const r of result.rows) allRows.push(r); } if (allRows.length === 0) { @@ -1041,7 +1041,7 @@ module.exports = function(pool) { for (const r of result.rows) { if (r.pf_logid != null) sqlByLogId.set(r.pf_logid, sql); } - allRows.push(...result.rows); + for (const r of result.rows) allRows.push(r); } // Every coordinate in the selection nets to zero -- nothing to move. // Refused like scale's no-op rather than committing an empty log @@ -1161,7 +1161,7 @@ module.exports = function(pool) { for (const r of result.rows) { if (r.pf_logid != null) sqlByLogId.set(r.pf_logid, sql); } - allRows.push(...result.rows); + for (const r of result.rows) allRows.push(r); } await client.query('COMMIT'); committed = true;