MOBILE-2856 data: Fix apply offline actions

main
Albert Gasset 2019-05-22 15:48:42 +02:00
parent 99774954a4
commit 923bf999e8
1 changed files with 3 additions and 1 deletions

View File

@ -212,11 +212,13 @@ export class AddonModDataFieldsDelegate extends CoreDelegate {
* @return {any} Data overriden * @return {any} Data overriden
*/ */
overrideData(field: any, originalContent: any, offlineContent: any, offlineFiles?: any): any { overrideData(field: any, originalContent: any, offlineContent: any, offlineFiles?: any): any {
originalContent = originalContent || {};
if (!offlineContent) { if (!offlineContent) {
return originalContent; return originalContent;
} }
return this.executeFunctionOnEnabled(field.type, 'overrideData', [originalContent || {}, offlineContent, offlineFiles]); return this.executeFunctionOnEnabled(field.type, 'overrideData', [originalContent, offlineContent, offlineFiles]);
} }
} }