mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	fixes
This commit is contained in:
		| @@ -22,12 +22,10 @@ export default class Component { | ||||
|         } | ||||
|  | ||||
|         if (propagateToChildren) { | ||||
|             for (const child of this.children) { | ||||
|                 let promise = child.eventReceived(name, data, sync); | ||||
|             const promise = this.triggerChildren(name, data, sync); | ||||
|  | ||||
|                 if (sync) { | ||||
|                     await promise; | ||||
|                 } | ||||
|             if (sync) { | ||||
|                 await promise; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| @@ -35,4 +33,14 @@ export default class Component { | ||||
|     trigger(name, data, sync = false) { | ||||
|         this.appContext.trigger(name, data, sync); | ||||
|     } | ||||
|  | ||||
|     async triggerChildren(name, data, sync = false) { | ||||
|         for (const child of this.children) { | ||||
|             let promise = child.eventReceived(name, data, sync); | ||||
|  | ||||
|             if (sync) { | ||||
|                 await promise; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user