mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix sync
This commit is contained in:
		| @@ -156,10 +156,7 @@ async function pullSync(syncContext) { | |||||||
|                     appliedPulls++; |                     appliedPulls++; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 // can be undefined for options with isSynced=false |                 await syncUpdateService.updateEntity(sync, entity, syncContext.sourceId); | ||||||
|                 if (entity) { |  | ||||||
|                     await syncUpdateService.updateEntity(sync, entity, syncContext.sourceId); |  | ||||||
|                 } |  | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             stats.outstandingPulls = resp.maxSyncId - sync.id; |             stats.outstandingPulls = resp.maxSyncId - sync.id; | ||||||
|   | |||||||
| @@ -4,6 +4,11 @@ const syncTableService = require('./sync_table'); | |||||||
| const eventService = require('./events'); | const eventService = require('./events'); | ||||||
|  |  | ||||||
| async function updateEntity(sync, entity, sourceId) { | async function updateEntity(sync, entity, sourceId) { | ||||||
|  |     // can be undefined for options with isSynced=false | ||||||
|  |     if (!entity) { | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     const {entityName} = sync; |     const {entityName} = sync; | ||||||
|  |  | ||||||
|     if (entityName === 'notes') { |     if (entityName === 'notes') { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user