diff --git a/src/addon/mod/data/lang/en.json b/src/addon/mod/data/lang/en.json index 036cc21e4..f358c48a8 100644 --- a/src/addon/mod/data/lang/en.json +++ b/src/addon/mod/data/lang/en.json @@ -34,7 +34,6 @@ "recorddisapproved": "Entry unapproved", "resetsettings": "Reset filters", "search": "Search", - "single": "View single", "selectedrequired": "All selected required", "single": "View single", "timeadded": "Time added", 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]); } }