diff --git a/src/addons/calendar/services/calendar-helper.ts b/src/addons/calendar/services/calendar-helper.ts index 593637898..80d70451f 100644 --- a/src/addons/calendar/services/calendar-helper.ts +++ b/src/addons/calendar/services/calendar-helper.ts @@ -546,12 +546,12 @@ export class AddonCalendarHelperProvider { const site = await CoreSites.getSite(siteId); const fetchTimestarts: number[] = []; const invalidateTimestarts: number[] = []; - const promises: Promise[] = []; + let promises: Promise[] = []; // Always fetch upcoming events. promises.push(AddonCalendar.getUpcomingEvents(undefined, undefined, true, site.id)); - promises.concat(events.map(async (eventData) => { + promises = promises.concat(events.map(async (eventData) => { if (eventData.repeated <= 1) { // Not repeated. diff --git a/src/addons/mod/forum/services/handlers/prefetch.ts b/src/addons/mod/forum/services/handlers/prefetch.ts index a9c55d2e9..79e1bf33b 100644 --- a/src/addons/mod/forum/services/handlers/prefetch.ts +++ b/src/addons/mod/forum/services/handlers/prefetch.ts @@ -48,13 +48,13 @@ export class AddonModForumPrefetchHandlerService extends CoreCourseActivityPrefe try { const forum = await AddonModForum.getForum(courseId, module.id); - const files = this.getIntroFilesFromInstance(module, forum); + let files = this.getIntroFilesFromInstance(module, forum); // Get posts. const posts = await this.getPostsForPrefetch(forum, { cmId: module.id }); // Add posts attachments and embedded files. - files.concat(this.getPostsFiles(posts)); + files = files.concat(this.getPostsFiles(posts)); return files; } catch (error) { diff --git a/src/addons/mod/glossary/components/index/index.ts b/src/addons/mod/glossary/components/index/index.ts index 03be8f63b..d79b755ea 100644 --- a/src/addons/mod/glossary/components/index/index.ts +++ b/src/addons/mod/glossary/components/index/index.ts @@ -573,7 +573,6 @@ class AddonModGlossaryEntriesManager extends CorePageItemsListManager */ setOnlineEntries(onlineEntries: AddonModGlossaryEntry[], hasMoreItems: boolean = false): void { this.setItems(( this.offlineEntries).concat(onlineEntries), hasMoreItems); - this.onlineEntries.concat(onlineEntries); } /** @@ -583,7 +582,6 @@ class AddonModGlossaryEntriesManager extends CorePageItemsListManager */ setOfflineEntries(offlineEntries: AddonModGlossaryOfflineEntry[]): void { this.setItems(( offlineEntries).concat(this.onlineEntries), this.hasMoreItems); - this.offlineEntries = offlineEntries; } /** diff --git a/src/addons/notes/services/notes-sync.ts b/src/addons/notes/services/notes-sync.ts index 2df96b2ce..a9dfac04d 100644 --- a/src/addons/notes/services/notes-sync.ts +++ b/src/addons/notes/services/notes-sync.ts @@ -62,12 +62,10 @@ export class AddonNotesSyncProvider extends CoreSyncBaseProvider { - const courseIds = notes.map((note) => note.courseid); - - courseIds.concat(courseIds); - }, []); + courseIds = courseIds.concat(notes.map((note) => note.courseid)); + }); CoreUtils.uniqueArray(courseIds); diff --git a/src/core/features/mainmenu/mainmenu-tab-routing.module.ts b/src/core/features/mainmenu/mainmenu-tab-routing.module.ts index 3a4c0ddb0..ca9c0538c 100644 --- a/src/core/features/mainmenu/mainmenu-tab-routing.module.ts +++ b/src/core/features/mainmenu/mainmenu-tab-routing.module.ts @@ -24,7 +24,7 @@ export function buildTabMainRoutes(injector: Injector, mainRoute: Route): Routes mainRoute.path = mainRoute.path || ''; mainRoute.children = mainRoute.children || []; - mainRoute.children.concat(routes.children); + mainRoute.children = mainRoute.children.concat(routes.children); return [ mainRoute,