From 30511db13177750fd96e91ef452c9a33a3fbf07b Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 13 Mar 2018 09:55:22 +0100 Subject: [PATCH] MOBILE-2333 siteplugins: Receive otherdata as array instead of string --- src/core/siteplugins/providers/siteplugins.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/siteplugins/providers/siteplugins.ts b/src/core/siteplugins/providers/siteplugins.ts index 572d7d780..b21100ba3 100644 --- a/src/core/siteplugins/providers/siteplugins.ts +++ b/src/core/siteplugins/providers/siteplugins.ts @@ -217,8 +217,7 @@ export class CoreSitePluginsProvider { return this.sitesProvider.getCurrentSite().read('tool_mobile_get_content', data, preSets); }).then((result) => { if (result.otherdata) { - result.otherdata = this.textUtils.parseJSON(result.otherdata, {}, - this.logger.error.bind(this.logger, 'Error parsing get_content otherdata', method)); + result.otherdata = this.utils.objectToKeyValueMap(result.otherdata, 'name', 'value'); } else { result.otherdata = {}; }