Merge pull request #2574 from dpalou/MOBILE-3523

MOBILE-3523 mod: Fix cannot get siteId of undefined
main
Dani Palou 2020-10-26 10:08:53 +01:00 committed by GitHub
commit b6e7195fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -929,7 +929,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 = {