File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,15 +90,12 @@ class OnyxSnapshotCache {
9090 // Always invalidate the exact key
9191 this . snapshotCache . delete ( keyToInvalidate ) ;
9292
93- // Handle collection-related keys with selective invalidation
94- if ( OnyxUtils . isCollectionKey ( keyToInvalidate ) ) {
95- const baseKey = OnyxUtils . getCollectionKey ( keyToInvalidate ) ;
96-
97- // If this is a collection member key (e.g., "reports_123")
98- // Only invalidate upward to the collection base key
99- if ( baseKey !== keyToInvalidate ) {
100- this . snapshotCache . delete ( baseKey ) ;
101- }
93+ try {
94+ // Check if the key is a collection member and invalidate the collection base key
95+ const collectionBaseKey = OnyxUtils . getCollectionKey ( keyToInvalidate ) ;
96+ this . snapshotCache . delete ( collectionBaseKey ) ;
97+ } catch ( e ) {
98+ // do nothing - this just means the key is not a collection member
10299 }
103100 }
104101
You can’t perform that action at this time.
0 commit comments