I'm unable to run this query, which seems to be something pretty simple and something which used to work before:
return [
{
id: '3711affa-7c6f-42ff-936d-af42557789ce',
created_at: moment(),
},
{
id: '13df8993-7311-4226-94f8-7c1331d91bae',
created_at: moment(),
}
]
I am getting this error when I try to run this:
query1 failed (0.001s):Failed to execute 'postMessage' on 'Window': function(e){var t=e%10;return e+(1===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")} could not be cloned.
jg80
July 27, 2024, 4:38pm
2
Is there a reason to use moment() in particular? The following works:
return [
{
id: '3711affa-7c6f-42ff-936d-af42557789ce',
created_at: new Date(),
},
{
id: '13df8993-7311-4226-94f8-7c1331d91bae',
created_at: new Date(),
}
]
1 Like
Tess
July 31, 2024, 5:52pm
3
Returning the moment
object directly will throw an error, but adding .format() works
1 Like
Yes, but imagine that I would like to get the moment.js object itself in a JavaScript object?
pyrrho
August 1, 2024, 2:41pm
5
It seems any attempt to use a moment object in an return array is throwing the same error: