diff --git a/src/addon/mod/data/providers/data.ts b/src/addon/mod/data/providers/data.ts index cde86d294..0c4d01e23 100644 --- a/src/addon/mod/data/providers/data.ts +++ b/src/addon/mod/data/providers/data.ts @@ -947,7 +947,7 @@ export class AddonModDataProvider { * @param options Other options. * @return Promise resolved when the action is done. */ - searchEntries(dataId: number, options?: AddonModDataSearchEntriesOptions): Promise { + searchEntries(dataId: number, options: AddonModDataSearchEntriesOptions = {}): Promise { options.groupId = options.groupId || 0; options.sort = options.sort || 0; options.order || options.order || 'DESC'; diff --git a/src/addon/mod/folder/providers/folder.ts b/src/addon/mod/folder/providers/folder.ts index a75520c16..af356293f 100644 --- a/src/addon/mod/folder/providers/folder.ts +++ b/src/addon/mod/folder/providers/folder.ts @@ -57,7 +57,7 @@ export class AddonModFolderProvider { * @param options Other options. * @return Promise resolved when the book is retrieved. */ - protected getFolderByKey(courseId: number, key: string, value: any, options?: CoreSitesCommonWSOptions) + protected getFolderByKey(courseId: number, key: string, value: any, options: CoreSitesCommonWSOptions = {}) : Promise { return this.sitesProvider.getSite(options.siteId).then((site) => { const params = {