Update client/src/components/Collections/PairedListCollectionCreator.vue

using endsWith instead of substring

Co-authored-by: Dannon <dannon.baker@gmail.com>
This commit is contained in:
Assunta DeSanto
2021-10-19 15:12:05 -04:00
committed by GitHub
co-authored by Dannon
parent 6828b41426
commit c70d281f7a
@@ -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}`;