diff --git a/src/addon/mod/data/providers/fields-delegate.ts b/src/addon/mod/data/providers/fields-delegate.ts index 43f2895c5..544d9f349 100644 --- a/src/addon/mod/data/providers/fields-delegate.ts +++ b/src/addon/mod/data/providers/fields-delegate.ts @@ -212,11 +212,13 @@ export class AddonModDataFieldsDelegate extends CoreDelegate { * @return {any} Data overriden */ overrideData(field: any, originalContent: any, offlineContent: any, offlineFiles?: any): any { + originalContent = originalContent || {}; + if (!offlineContent) { return originalContent; } - return this.executeFunctionOnEnabled(field.type, 'overrideData', [originalContent || {}, offlineContent, offlineFiles]); + return this.executeFunctionOnEnabled(field.type, 'overrideData', [originalContent, offlineContent, offlineFiles]); } }