mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Added boolean evaluation to InputAutocorrectionExtensionHandler
commit_hash:23c3fb9f386a273901242c94e0a0e8ebc48d52e1
This commit is contained in:
+5
-2
@@ -10,7 +10,7 @@ public final class InputAutocorrectionExtensionHandler: DivExtensionHandler {
|
||||
public func applyBeforeBaseProperties(
|
||||
to block: Block,
|
||||
div: DivBase,
|
||||
context _: DivBlockModelingContext
|
||||
context: DivBlockModelingContext
|
||||
) -> Block {
|
||||
guard let textInputBlock = block as? TextInputBlock else {
|
||||
return block
|
||||
@@ -18,7 +18,10 @@ public final class InputAutocorrectionExtensionHandler: DivExtensionHandler {
|
||||
|
||||
let params = getExtensionParams(div)
|
||||
|
||||
guard let autocorrectionEnabled = params["enabled"] as? Bool else {
|
||||
guard let autocorrectionEnabled = try? params.getOptionalBool(
|
||||
"enabled",
|
||||
expressionResolver: context.expressionResolver
|
||||
) else {
|
||||
return block
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user