Fix URL normalization in import script

pull/2367/head
Chocobozzz 2019-12-30 10:44:50 +01:00
parent 1f3a605e10
commit 4449d2695b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -333,7 +333,7 @@ function isNSFW (info: any) {
function normalizeTargetUrl (url: string) {
let normalizedUrl = url.replace(/\/+$/, '')
if (!normalizedUrl.startsWith('http://') || !normalizedUrl.startsWith('https://')) {
if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) {
normalizedUrl = 'https://' + normalizedUrl
}