Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
fix(backend:files): handle optional chaining in indexing key generation
johaven2b2c2385f64e
diff --git a/backend/src/applications/files/utils/indexing.ts b/backend/src/applications/files/utils/indexing.tsindex 3d0a96f2..f8a10a08 100644--- a/backend/src/applications/files/utils/indexing.ts+++ b/backend/src/applications/files/utils/indexing.ts@@ -12,7 +12,7 @@ export function indexingUpdateCacheKeysFromSpace(userId: number, space: SpaceEnvif (space.inSharesRepository && !space.root.externalPath) {// shares that are linked to a space must also be indexedcacheKeys.push(`${CACHE_INDEXING_UPDATE_PREFIX}-${genIndexingKey(space.id, FILE_REPOSITORY.SHARE, '-')}`)- } else if (space.inFilesRepository && space.root.owner?.login) {+ } else if (space.inFilesRepository && space.root?.owner?.login) {// space where the user’s root file is anchoredcacheKeys.push(`${CACHE_INDEXING_UPDATE_PREFIX}-${genIndexingKey(space.id, FILE_REPOSITORY.SPACE, '-')}`)}