Merge pull request #2066 from dpalou/MOBILE-3118
MOBILE-3118 siteplugins: Stringify objects copied from otherdatamain
commit
152bbca149
|
@ -445,12 +445,23 @@ export class CoreSitePluginsProvider {
|
||||||
// Include only the properties specified in the array.
|
// Include only the properties specified in the array.
|
||||||
for (const i in useOtherData) {
|
for (const i in useOtherData) {
|
||||||
const name = useOtherData[i];
|
const name = useOtherData[i];
|
||||||
args[name] = otherData[name];
|
|
||||||
|
if (typeof otherData[name] == 'object' && otherData[name] !== null) {
|
||||||
|
// Stringify objects.
|
||||||
|
args[name] = JSON.stringify(otherData[name]);
|
||||||
|
} else {
|
||||||
|
args[name] = otherData[name];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Add all the data to args.
|
// Add all the data to args.
|
||||||
for (const name in otherData) {
|
for (const name in otherData) {
|
||||||
args[name] = otherData[name];
|
if (typeof otherData[name] == 'object' && otherData[name] !== null) {
|
||||||
|
// Stringify objects.
|
||||||
|
args[name] = JSON.stringify(otherData[name]);
|
||||||
|
} else {
|
||||||
|
args[name] = otherData[name];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue