mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Fix retain cycle in FunctionsProvider
commit_hash:d027819ab8d0c728a578ccdedabe37b174f8aa7b
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user