MOBILE-2333 siteplugins: Receive otherdata as array instead of string

main
Dani Palou 2018-03-13 09:55:22 +01:00
parent 489de4fc09
commit 30511db131
1 changed files with 1 additions and 2 deletions

View File

@ -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 = {};
}