From b7b8d3879354e5e7e94d50e0d9deec99151c355b Mon Sep 17 00:00:00 2001 From: Svend Date: Tue, 19 Nov 2019 17:12:10 +0800 Subject: [PATCH] :bug: When the domain is empty, no supplementary scheme is needed. --- uPic/Models/HostConfig.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uPic/Models/HostConfig.swift b/uPic/Models/HostConfig.swift index 493f8458..6d000b4a 100644 --- a/uPic/Models/HostConfig.swift +++ b/uPic/Models/HostConfig.swift @@ -154,7 +154,7 @@ class HostConfig: NSObject, Codable { self.setValue(domain, forKey: "domain") } - if (!domain.hasPrefix("http://") && !domain.hasPrefix("https://")) { + if (!domain.isEmpty && !domain.hasPrefix("http://") && !domain.hasPrefix("https://")) { domain = "http://\(domain)" self.setValue(domain, forKey: "domain") }