Closed Timmiej93 closed 3 months ago
Hi,
entries.push() // mutates the array
entries = [] // replaces the variable value
await db.update((data) => {
data.entries = [] // will mutate the data object and replace the entries value
})
// or
await db.update(({ entries }) => {
entries.length = 0 // truncates the array
})
I figured it had to be something like that, since entries.push()
did work. Thanks for clarifying!
I have a basic setup like this:
I can push entries like this:
I can also set the database like this:
But I can't set the database like this:
Is this something I'm doing wrong, or is this a bug?