rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.05k stars 37 forks source link

deepClone cycle detection is invalid #643

Closed arv closed 3 years ago

arv commented 3 years ago

Given the following object:

const a = [];
const b = [a, a];
deepClone(b);

This throws today because we see a twice. We should push/pop (add/delete) as we go into deeper structures.