commit
						3de64edd24
					
				| @ -122,7 +122,24 @@ export class AddonModForumPrefetchHandler extends CoreCourseActivityPrefetchHand | ||||
|             }); | ||||
|         }); | ||||
| 
 | ||||
|         return Promise.all(promises); | ||||
|         return Promise.all(promises).then((results) => { | ||||
|             // Each order has returned its own list of posts. Merge all the lists, preventing duplicates.
 | ||||
|             const posts = [], | ||||
|                 postIds = {}; // To make the array unique.
 | ||||
| 
 | ||||
|             results.forEach((orderResults) => { | ||||
|                 orderResults.forEach((orderResult) => { | ||||
|                     orderResult.posts.forEach((post) => { | ||||
|                         if (!postIds[post.id]) { | ||||
|                             postIds[post.id] = true; | ||||
|                             posts.push(post); | ||||
|                         } | ||||
|                     }); | ||||
|                 }); | ||||
|             }); | ||||
| 
 | ||||
|             return posts; | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | ||||
| @ -88,6 +88,7 @@ export class AddonModGlossaryEditPage implements OnInit { | ||||
|         if (entry) { | ||||
|             this.entry.concept = entry.concept || ''; | ||||
|             this.entry.definition = entry.definition || ''; | ||||
|             this.entry.timecreated = entry.timecreated || 0; | ||||
| 
 | ||||
|             this.originalData = { | ||||
|                 concept: this.entry.concept, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user