fix: add default value for base url

This commit is contained in:
JustSong
2023-09-18 22:49:05 +08:00
parent 37e09d764c
commit 1d258cc898
2 changed files with 2 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ const EditChannel = () => {
return;
}
let localInputs = inputs;
if (localInputs.base_url.endsWith('/')) {
if (localInputs.base_url && localInputs.base_url.endsWith('/')) {
localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
}
if (localInputs.type === 3 && localInputs.other === '') {