From 95f66ab82c530cbe6ea2b367cf96d75fce367acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Mon, 8 Jan 2024 15:33:18 +0300 Subject: [PATCH] d --- Modules/BusX/BusUI/src/BusUI.ManyTextField.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Modules/BusX/BusUI/src/BusUI.ManyTextField.swift b/Modules/BusX/BusUI/src/BusUI.ManyTextField.swift index 5f544da..8f731a6 100644 --- a/Modules/BusX/BusUI/src/BusUI.ManyTextField.swift +++ b/Modules/BusX/BusUI/src/BusUI.ManyTextField.swift @@ -34,14 +34,16 @@ extension BusUI { textUI, $v .removeDuplicates() - .compactMap(onlyUIText) - .compactMap { v -> Any in - if let id { - var d = [String: String]() - d[id] = v - return MPAK.Many([id], d) + .compactMap { v in + guard + let id, + let text = onlyUIText(v) + else { + return nil } - return v + var d = [String: String]() + d[id] = v + return MPAK.Many([id], d) } .eraseToAnyPublisher(), &subscriptions