We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8195ef4 commit cd98914Copy full SHA for cd98914
1 file changed
vis/js/templates/listentry/Details.jsx
@@ -48,15 +48,17 @@ const getAuthorsString = (authorsList, maxLength) => {
48
return "";
49
}
50
51
+ const authorsListCopy = [...authorsList];
52
+
53
const ellipsis = "...";
54
const join = ", ";
- let finalString = authorsList.shift();
- while (authorsList.length > 0) {
55
- const nextAuthor = authorsList.shift();
+ let finalString = authorsListCopy.shift();
56
+ while (authorsListCopy.length > 0) {
57
+ const nextAuthor = authorsListCopy.shift();
58
let nextPossibleLength =
59
finalString.length + join.length + nextAuthor.length;
60
- if (authorsList.length !== 0) {
61
+ if (authorsListCopy.length !== 0) {
62
nextPossibleLength += ellipsis.length;
63
64
0 commit comments