mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	(core) Change array.reverse() in GranularAccess to avoid accidental in-place reversal.
Test Plan: Added a test case to tickle the bug this was causing. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2718
This commit is contained in:
		
							parent
							
								
									ec023a3ba6
								
							
						
					
					
						commit
						7c81cf2368
					
				@ -642,8 +642,8 @@ export class GranularAccess {
 | 
			
		||||
    // TODO: this would need to be elaborated to work well on bundles containing table
 | 
			
		||||
    // renames.
 | 
			
		||||
    const tableId = getTableId(rowsBefore);
 | 
			
		||||
    for (const snapshots of allRowSnapshots.reverse()) {
 | 
			
		||||
      const rowsAfter = snapshots[1];
 | 
			
		||||
    for (let i = allRowSnapshots.length - 1; i >= 0; i--) {
 | 
			
		||||
      const rowsAfter = allRowSnapshots[i][1];
 | 
			
		||||
      if (getTableId(rowsAfter) === tableId) {
 | 
			
		||||
        return {rowsBefore, rowsAfter};
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user