Merge pull request #2574 from dpalou/MOBILE-3523
MOBILE-3523 mod: Fix cannot get siteId of undefinedmain
commit
b6e7195fe8
|
@ -929,7 +929,7 @@ export class AddonModDataProvider {
|
||||||
* @param options Other options.
|
* @param options Other options.
|
||||||
* @return Promise resolved when the action is done.
|
* @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.groupId = options.groupId || 0;
|
||||||
options.sort = options.sort || 0;
|
options.sort = options.sort || 0;
|
||||||
options.order || options.order || 'DESC';
|
options.order || options.order || 'DESC';
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class AddonModFolderProvider {
|
||||||
* @param options Other options.
|
* @param options Other options.
|
||||||
* @return Promise resolved when the book is retrieved.
|
* @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> {
|
: Promise<AddonModFolderFolder> {
|
||||||
return this.sitesProvider.getSite(options.siteId).then((site) => {
|
return this.sitesProvider.getSite(options.siteId).then((site) => {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
Loading…
Reference in New Issue