MOBILE-3653 course: Fix error in console on app start
parent
8ea94c5ac3
commit
bd07f10cfb
|
@ -37,6 +37,11 @@ export class CoreCourseLogCronHandlerService implements CoreCronHandler {
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
async execute(siteId?: string, force?: boolean): Promise<void> {
|
async execute(siteId?: string, force?: boolean): Promise<void> {
|
||||||
|
if (!siteId && !CoreSites.isLoggedIn()) {
|
||||||
|
// No current site, stop.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const site = await CoreSites.getSite(siteId);
|
const site = await CoreSites.getSite(siteId);
|
||||||
|
|
||||||
return CoreCourse.logView(site.getSiteHomeId(), undefined, site.getId(), site.getInfo()?.sitename);
|
return CoreCourse.logView(site.getSiteHomeId(), undefined, site.getId(), site.getInfo()?.sitename);
|
||||||
|
|
Loading…
Reference in New Issue