You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue affects valtio-yjs specifically, as it functions correctly with vanilla valtio.
Here is a simplified example of the issue: codesandbox
I have an object structure similar to this:
type child = {
id: string;
parent: string;
};
type parent = {
children: {
[id: string]: child;
};
};
type State = {
parents: {
[id: string]: parent;
};
};
If I delete a child of a parent and then immediately delete the parent, then valtio-yjs throws an undefined error.
The use case for this logic is used when I'm deleting a child from a parent, and if the child is the last child in parent, then delete the parent.
This isn't a major issue, since you can get around this issue by checking if it's the last child and then just deleting the parent directly. However, seeing as this is functional with vanilla valtio, It should probably work with valtio-yjs as well.
The text was updated successfully, but these errors were encountered:
This issue affects valtio-yjs specifically, as it functions correctly with vanilla valtio.
Here is a simplified example of the issue: codesandbox
I have an object structure similar to this:
If I delete a child of a parent and then immediately delete the parent, then valtio-yjs throws an undefined error.
The use case for this logic is used when I'm deleting a child from a parent, and if the child is the last child in parent, then delete the parent.
This isn't a major issue, since you can get around this issue by checking if it's the last child and then just deleting the parent directly. However, seeing as this is functional with vanilla valtio, It should probably work with valtio-yjs as well.
The text was updated successfully, but these errors were encountered: