MOBILE-3523 mod: Fix cannot get siteId of undefined

main
Dani Palou 2020-10-26 09:20:34 +01:00
parent 0124b4d567
commit 4de10e2d9f
2 changed files with 2 additions and 2 deletions

View File

@ -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<AddonModDataEntries> {
searchEntries(dataId: number, options: AddonModDataSearchEntriesOptions = {}): Promise<AddonModDataEntries> {
options.groupId = options.groupId || 0;
options.sort = options.sort || 0;
options.order || options.order || 'DESC';

View File

@ -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<AddonModFolderFolder> {
return this.sitesProvider.getSite(options.siteId).then((site) => {
const params = {