MOBILE-3320 sync: Fix cannot read 'updated' of undefined
parent
7cc8fa0b9e
commit
c15d5de95d
|
@ -407,8 +407,8 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
|
|||
*
|
||||
* @return Promise resolved when done.
|
||||
*/
|
||||
protected async sync(): Promise<void> {
|
||||
await AddonModAssignSync.syncAssign(this.assign!.id);
|
||||
protected sync(): Promise<AddonModAssignSyncResult> {
|
||||
return AddonModAssignSync.syncAssign(this.assign!.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -235,12 +235,12 @@ export class AddonModAssignEditPage implements OnInit, OnDestroy, CanLeave {
|
|||
* @param inputData The input data.
|
||||
* @return Promise resolved with the data to submit.
|
||||
*/
|
||||
protected prepareSubmissionData(inputData: CoreFormFields): Promise<AddonModAssignSavePluginData> {
|
||||
protected async prepareSubmissionData(inputData: CoreFormFields): Promise<AddonModAssignSavePluginData> {
|
||||
// If there's offline data, always save it in offline.
|
||||
this.saveOffline = this.hasOffline;
|
||||
|
||||
try {
|
||||
return AddonModAssignHelper.prepareSubmissionPluginData(
|
||||
return await AddonModAssignHelper.prepareSubmissionPluginData(
|
||||
this.assign!,
|
||||
this.userSubmission,
|
||||
inputData,
|
||||
|
@ -251,7 +251,7 @@ export class AddonModAssignEditPage implements OnInit, OnDestroy, CanLeave {
|
|||
// Cannot submit in online, prepare for offline usage.
|
||||
this.saveOffline = true;
|
||||
|
||||
return AddonModAssignHelper.prepareSubmissionPluginData(
|
||||
return await AddonModAssignHelper.prepareSubmissionPluginData(
|
||||
this.assign!,
|
||||
this.userSubmission,
|
||||
inputData,
|
||||
|
|
|
@ -514,8 +514,8 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
*
|
||||
* @return Promise resolved when done.
|
||||
*/
|
||||
protected async sync(): Promise<void> {
|
||||
await AddonModDataPrefetchHandler.sync(this.module, this.courseId);
|
||||
protected sync(): Promise<AddonModDataSyncResult> {
|
||||
return AddonModDataPrefetchHandler.sync(this.module, this.courseId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -233,8 +233,8 @@ export class AddonModSurveyIndexComponent extends CoreCourseModuleMainActivityCo
|
|||
*
|
||||
* @return Promise resolved when done.
|
||||
*/
|
||||
protected async sync(): Promise<void> {
|
||||
await AddonModSurveySync.syncSurvey(this.survey!.id, this.currentUserId);
|
||||
protected sync(): Promise<AddonModSurveySyncResult> {
|
||||
return AddonModSurveySync.syncSurvey(this.survey!.id, this.currentUserId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue