Skip to content

Commit 7abd29e

Browse files
committed
fix: Fix 'send' type action In TabLinkNavigator
MatchPathUsable type casting is always fails
1 parent 94b8d60 commit 7abd29e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/LinkNavigator/Core/Core/TabLinkNavigator/TabPartialNavigator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ extension TabPartialNavigator: TabLinkNavigatorProtocol {
272272
.compactMap { $0 as? MatchPathUsable } ?? []
273273
} else {
274274
matchPathUsables = rootNavigator?.tabRootPartialNavigators
275-
.flatMap(\.currentController?.viewControllers)
275+
.flatMap { $0.currentController?.viewControllers ?? [] }
276276
.compactMap { $0 as? MatchPathUsable } ?? []
277277
}
278278

@@ -301,7 +301,7 @@ extension TabPartialNavigator: TabLinkNavigatorProtocol {
301301

302302
public func allSend(linkItem: LinkItem) {
303303
rootNavigator?.tabRootPartialNavigators
304-
.flatMap(\.currentController?.viewControllers)
304+
.flatMap { $0.currentController?.viewControllers ?? [] }
305305
.compactMap { $0 as? MatchPathUsable }
306306
.forEach {
307307
$0.eventSubscriber?.receive(encodedItemString: linkItem.encodedItemString)

0 commit comments

Comments
 (0)