chore: remove trailing slash when submitting

This commit is contained in:
JustSong
2022-11-23 17:44:24 +08:00
parent 1583997d10
commit 53ccb42152
3 changed files with 18 additions and 10 deletions
+8
View File
@@ -89,3 +89,11 @@ export function showNotice(message) {
export function openPage(url) {
window.open(url);
}
export function removeTrailingSlash(url) {
if (url.endsWith('/')) {
return url.slice(0, -1);
} else {
return url;
}
}