Исправил баг в SwitchUnitAction
This commit is contained in:
parent
5f97e5e47e
commit
b23f5dc914
@ -15,14 +15,16 @@ public class SwitchUnitAction implements ActionUnit<SwitchUnit<Message>, Message
|
||||
|
||||
@Override
|
||||
public Uni<UnitRequest<MainUnit, Message>> action(UnitRequest<SwitchUnit<Message>, Message> unitRequest) {
|
||||
final SwitchUnit<Message> unit = unitRequest.getUnit();
|
||||
final Message message = unitRequest.getMessage();
|
||||
final Set<MainUnit<Message>> nextUnits = unitRequest.getUnit().getNextUnits();
|
||||
|
||||
final Set<MainUnit<Message>> nextUnits = unit.getNextUnits();
|
||||
return Responder.nextUnit(message, nextUnits)
|
||||
.map(nextUnit -> {
|
||||
if (checkNotNull(nextUnit)) {
|
||||
return UnitRequest.of(nextUnit, message);
|
||||
}
|
||||
return null;
|
||||
return UnitRequest.of(unit, message);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user