Fix retain cycle in FunctionsProvider

commit_hash:d027819ab8d0c728a578ccdedabe37b174f8aa7b
This commit is contained in:
nshapovalov01
2026-05-27 09:51:41 +03:00
parent f997b396da
commit c11cb232c0
@@ -15,7 +15,8 @@ final class FunctionsProvider {
lock.withLock { [weak self] in
guard let self else { return [:] }
var functions = staticFunctions
functions.addGetStoredValueFunctions({ name, scope in
functions.addGetStoredValueFunctions({ [weak self] name, scope in
guard let self else { return nil }
let storageCardId: DivCardID? = (scope == .global) ? nil : self.cardId
return self.persistentValuesStorage.get(name: name, cardId: storageCardId)
})