mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	(core) API fix for a bug that treated 0 as null
Summary: Bug with 'records' endpoint that was treating 0 as null. Test Plan: Modified tests Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3262
This commit is contained in:
		
							parent
							
								
									7cc3092e1b
								
							
						
					
					
						commit
						66eb0b91b8
					
				@ -272,7 +272,7 @@ export class DocWorkerApi {
 | 
			
		||||
      const fieldNames = new Set<string>(_.flatMap(records, r => Object.keys(r.fields ?? {})));
 | 
			
		||||
      const result: BulkColValues = {};
 | 
			
		||||
      for (const fieldName of fieldNames) {
 | 
			
		||||
        result[fieldName] = records.map(record => record.fields?.[fieldName] || null);
 | 
			
		||||
        result[fieldName] = records.map(record => record.fields?.[fieldName] ?? null);
 | 
			
		||||
      }
 | 
			
		||||
      return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user