diff --git a/Sources/XCEUniFlow/4_Dispatcher/Dispatcher.swift b/Sources/XCEUniFlow/4_Dispatcher/Dispatcher.swift index 34602ff..5650f3a 100644 --- a/Sources/XCEUniFlow/4_Dispatcher/Dispatcher.swift +++ b/Sources/XCEUniFlow/4_Dispatcher/Dispatcher.swift @@ -243,7 +243,7 @@ extension Dispatcher @available(macOS 12.0, *) func when( _: M.Type, - given: ((M) throws -> R?)? = nil + given: (M) throws -> R? ) async throws -> R { var resultMaybe: Result? = nil @@ -262,7 +262,7 @@ extension Dispatcher do { if - let output = try given?(mutation) + let output = try given(mutation) { resultMaybe = .success(output) }