Skip to content

Commit c430d32

Browse files
committed
linting
1 parent d669a7c commit c430d32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pages/browse/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ const Browse = ({ session }) => {
4949
}
5050

5151
const truncateDescription = (desc = '', maxLength, isOpen) => {
52-
if (desc.length <= maxLength || isOpen) return { truncated: desc, cutOffIndex: desc.length };
53-
const lastSpaceIndex = desc.substring(0, maxLength).lastIndexOf(' ');
54-
const ellipsis = isOpen ? '' : '...';
55-
return { truncated: desc.slice(0, lastSpaceIndex) + ellipsis, cutOffIndex: lastSpaceIndex };
52+
if (desc.length <= maxLength || isOpen) return { truncated: desc, cutOffIndex: desc.length }
53+
const lastSpaceIndex = desc.substring(0, maxLength).lastIndexOf(' ')
54+
const ellipsis = isOpen ? '' : '...'
55+
return { truncated: desc.slice(0, lastSpaceIndex) + ellipsis, cutOffIndex: lastSpaceIndex }
5656
}
5757

5858
return (

0 commit comments

Comments
 (0)