Skip to content

Commit

Permalink
🐛 (nYnab) fix call-stack-exceeded error with fallback solution
Browse files Browse the repository at this point in the history
Closes #1968
  • Loading branch information
MatissJanis committed Dec 19, 2023
1 parent 5854dff commit 1bff509
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/loot-core/src/server/spreadsheet/spreadsheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ export default class Spreadsheet {
const cells = this.dirtyCells;
this.dirtyCells = [];

this.queueComputation(this.graph.topologicalSort(cells));
try {
this.queueComputation(this.graph.topologicalSort(cells));
} catch (e) {
console.error('Failed sorting cells. Falling back to unsorted list.');
this.queueComputation(cells);
}
}

return [];
Expand Down

0 comments on commit 1bff509

Please sign in to comment.