Fix for removing team from mutable object in cached map (#2637)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-02-15 12:06:37 +05:00 committed by GitHub
parent 13e667e7a7
commit d18d77f191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,6 @@ export function createCacheFindAll (storage: ServerStorage): ServerStorage['find
}
cacheResult = await storage.findAll(ctx, clazz, query, options)
queryCache.set(key, cacheResult)
return cacheResult as FindResult<T>
return storage.hierarchy.clone(cacheResult) as FindResult<T>
}
}