We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c03d807 commit f9b0ef5Copy full SHA for f9b0ef5
packages/nuxt/src/runtime/payload-plugin.ts
@@ -37,17 +37,18 @@ export default definePayloadPlugin(() => {
37
typeof data === 'object' &&
38
'id' in data &&
39
JSON.stringify({
40
- id: data.id,
41
...data,
+ id: data.id,
42
})
43
)
44
definePayloadReviver('DocumentData', (data: string) => {
45
const parsed = JSON.parse(data)
46
// preserve the non-enumerable property
47
// we need to delete it first
48
+ const idValue = parsed.id
49
delete parsed.id
50
return Object.defineProperty(parsed, 'id', {
- value: parsed.id,
51
+ value: idValue,
52
53
54
0 commit comments