Skip to content

Commit 477de50

Browse files
authored
Merge pull request #48 from CAAPIM/DE535352
DE535352 - fixed newline replacement
2 parents 804afa6 + 9d5c9e8 commit 477de50

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

packages/layer7-apihub/src/authentication/AccountSetup/TermsDialog.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Typography from '@material-ui/core/Typography';
1010
import LinearProgress from '@material-ui/core/LinearProgress';
1111
import { makeStyles } from '@material-ui/core/styles';
1212
import { Close } from '@material-ui/icons';
13+
import isEmpty from 'lodash/isEmpty';
1314

1415
import { useAuthenticationConfiguration } from '../useAuthenticationConfiguration';
1516

@@ -92,11 +93,15 @@ const DialogTitle = ({ children, onClose, ...rest }) => {
9293
const TermsField = ({ content }) => {
9394
return (
9495
<>
95-
{content.split('\n').map((section, index) => (
96-
<Typography key={index} variant="body2" paragraph>
97-
{section}
98-
</Typography>
99-
))}
96+
{content.split('\\n').map((section, index) =>
97+
isEmpty(section) ? (
98+
<br />
99+
) : (
100+
<Typography key={index} variant="body2" paragraph>
101+
{section}
102+
</Typography>
103+
)
104+
)}
100105
</>
101106
);
102107
};

0 commit comments

Comments
 (0)