mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-12-15 04:13:36 +01:00
Fix for withEither
This commit is contained in:
@@ -14,7 +14,7 @@ import { ErrorMessage } from "./ErrorMessage";
|
||||
function withEither(conditionalFn, Either) {
|
||||
return (Component) => (props) => {
|
||||
if (conditionalFn(props)) {
|
||||
return <Either />;
|
||||
return <Either {...props} />;
|
||||
}
|
||||
return <Component {...props} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user