remove trailing slash

This commit is contained in:
ThatOneCalculator 2023-07-14 18:38:53 -07:00
parent f3aa965c38
commit 7be2b16215
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -224,10 +224,9 @@ export default define(meta, paramDef, async (ps, me) => {
if (set.recommendedInstances?.length > 0) { if (set.recommendedInstances?.length > 0) {
set.recommendedInstances.forEach((instance, index) => { set.recommendedInstances.forEach((instance, index) => {
if (/^https?:\/\//i.test(instance)) { if (/^https?:\/\//i.test(instance)) {
set.recommendedInstances![index] = instance.replace( set.recommendedInstances![index] = instance
/^https?:\/\//i, .replace(/^https?:\/\//i, "")
"", .replace(/\/$/, "");
);
} }
}); });
} }