-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Trying to get a service setup using this lib however im running into some strange issues with persistance.
For some reason, when doing a filter over an array, it breaks with the error "# could not be cloned.". While debugging, it appears that forcing JS to create a new Array using JSON.parse/stringify, it successfully saves. Although i'm not convinced this hotfix will work 100% of the time.
console.log(
this.repeat_queue, // [ { event: 'testEvent.created', object: { }, repeat_count: 0 } ]
this.repeat_queue.isProxy // true
)
this.repeat_queue = this.repeat_queue.filter(e => e.id != event.id)
console.log(
this.repeat_queue, // [ { event: 'testEvent.created', object: { }, repeat_count: 0 } ] - Yes, the array is the same. However its considered dirty due to the Filter (??)
this.repeat_queue.isProxy // true
)
If you wanted to see the code for yourself:
https://github.com/drivly/webhooks.do/blob/main/src/webhook.durable.js#L119
Metadata
Metadata
Assignees
Labels
No labels