1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2025-06-16 13:46:16 +02:00

Fix for withEither

This commit is contained in:
Maciej Lenartowicz
2019-11-15 08:55:24 +00:00
parent d935f78d6e
commit b30f9f59b4
4 changed files with 6 additions and 6 deletions

View File

@ -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} />;
};