Skip to content

Commit a07c6a4

Browse files
committed
else is not necessary here
else is not necessary here since all if branches return, consider removing it to reduce nesting and make code more readable.
1 parent 8eca108 commit a07c6a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utils/functions/functions.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ export const trimmedStringToLength = (string, length) => {
1111
if (string.length > length) {
1212
const subStr = string.substring(0, length);
1313
return subStr + '...';
14-
} else {
15-
return string;
1614
}
15+
return string;
1716
};
1817

1918
/**

0 commit comments

Comments
 (0)