Remove quotes on string values for raw display (#9522)

This commit is contained in:
Pascal Jufer
2021-11-05 14:17:37 +01:00
committed by GitHub
parent ef182940ce
commit a0e5d27a3a

View File

@@ -5,7 +5,7 @@ export default defineDisplay({
id: 'raw',
name: '$t:displays.raw.raw',
icon: 'code',
component: ({ value }) => JSON.stringify(value),
component: ({ value }) => (typeof value === 'string' ? value : JSON.stringify(value)),
options: [],
types: TYPES,
localTypes: ['file', 'files', 'group', 'm2a', 'm2m', 'm2o', 'o2m', 'presentation', 'standard', 'translations'],