Skip to content

Commit 5c01355

Browse files
committed
fix: image file location and urlcleanup
1 parent 05400b2 commit 5c01355

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

components/db/profile/urlCleanup.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ export function cleanSocialLinks(network: keyof SocialLinks, link: string) {
77
const index: number = path.indexOf(".com/") + 5
88
path = path.substring(index)
99
}
10-
if (
11-
network === "mastodon" &&
12-
path.substring(path.indexOf("@") + 1).charAt(0) === "@"
13-
) {
14-
path.replace(
15-
path.substring(path.indexOf("@") + 1),
16-
path.substring(path.indexOf("@") + 2)
17-
)
10+
if (network === "mastodon" && path.startsWith("@")) {
11+
path = path.substring(1)
1812
}
1913
}
2014

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)