mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 05:56:10 +05:00
fixed memory leak
This commit is contained in:
@@ -36,7 +36,7 @@ export const useUpdateCache = hash => {
|
||||
return cache
|
||||
}
|
||||
|
||||
export const useCreateCacheMap = (cache, callback) => {
|
||||
export const useCreateCacheMap = cache => {
|
||||
const [cacheMap, setCacheMap] = useState([])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -67,8 +67,7 @@ export const useCreateCacheMap = (cache, callback) => {
|
||||
}
|
||||
|
||||
setCacheMap(map)
|
||||
callback && callback()
|
||||
}, [cache, callback])
|
||||
}, [cache])
|
||||
|
||||
return cacheMap
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user