File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/hypergraph/src/entity Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,12 @@ const subscribeToDocumentChanges = (handle: DocHandle<DocumentContent>) => {
6666 cacheEntry . entities . set ( entityId , decoded ) ;
6767
6868 if ( oldDecodedEntry ) {
69- // collect all the Ids for relation entries that don't exist in the `decoded` entry, but did in the `oldDecodedEntry`
69+ // collect all the Ids for relation entries in the `oldDecodedEntry`
7070 const deletedRelationIds = new Set < string > ( ) ;
71- for ( const [ fieldName , value ] of Object . entries ( oldDecodedEntry ) ) {
71+ for ( const [ , value ] of Object . entries ( oldDecodedEntry ) ) {
7272 if ( Array . isArray ( value ) ) {
7373 for ( const relationEntity of value ) {
74- // @ts -expect-error decoded is a valid object
75- if ( ! decoded [ fieldName ] ?. includes ( relationEntity . id ) ) {
76- deletedRelationIds . add ( relationEntity . id ) ;
77- }
74+ deletedRelationIds . add ( relationEntity . id ) ;
7875 }
7976 }
8077 }
You can’t perform that action at this time.
0 commit comments