From 49ca221bd19084373990df4a230cc425dea6b592 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 18 Oct 2021 14:07:14 -0400 Subject: [PATCH 1/3] removing last character of pair name if . or _ --- .../src/components/Collections/PairedListCollectionCreator.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index d50b696d8c5..f16445d7503 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -724,6 +724,9 @@ export default { revName = revName.replace(extension, ""); } } + if (lcs.substring(lcs.length-1) == "." || lcs.substring(lcs.length-1) == "_") { + lcs = lcs.substring(0,lcs.length-1) + } return lcs || `${fwdName} & ${revName}`; }, clickAutopair: function () { From 6828b41426cea70d04b6b5b0f2e93de6649f2830 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 18 Oct 2021 14:25:28 -0400 Subject: [PATCH 2/3] running prettier --- .../components/Collections/PairedListCollectionCreator.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index f16445d7503..8fee2dc0f3d 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -724,8 +724,8 @@ export default { revName = revName.replace(extension, ""); } } - if (lcs.substring(lcs.length-1) == "." || lcs.substring(lcs.length-1) == "_") { - lcs = lcs.substring(0,lcs.length-1) + if (lcs.substring(lcs.length - 1) == "." || lcs.substring(lcs.length - 1) == "_") { + lcs = lcs.substring(0, lcs.length - 1); } return lcs || `${fwdName} & ${revName}`; }, From c70d281f7a47aef87634ce3005ff42f9127b4636 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 19 Oct 2021 15:12:05 -0400 Subject: [PATCH 3/3] Update client/src/components/Collections/PairedListCollectionCreator.vue using endsWith instead of substring Co-authored-by: Dannon --- .../src/components/Collections/PairedListCollectionCreator.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index 8fee2dc0f3d..32d21b05b30 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -724,7 +724,7 @@ export default { revName = revName.replace(extension, ""); } } - if (lcs.substring(lcs.length - 1) == "." || lcs.substring(lcs.length - 1) == "_") { + if (lcs.endsWith(".") || lcs.endsWith("_")) { lcs = lcs.substring(0, lcs.length - 1); } return lcs || `${fwdName} & ${revName}`;