🐛 Fix: confused port number auto increasing when opening a new PicGo app

This commit is contained in:
Molunerfinn
2020-03-19 19:25:05 +08:00
parent f3575575ac
commit cd70a1a5cc
5 changed files with 47 additions and 14 deletions

View File

@@ -17,3 +17,9 @@ export const handleResponse = ({
response.write(JSON.stringify(body))
response.end()
}
export const ensureHTTPLink = (url: string): string => {
return url.startsWith('http')
? url
: `http://${url}`
}