summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadSettings/CustomListRepository.swift3
1 files changed, 3 insertions, 0 deletions
diff --git a/ios/MullvadSettings/CustomListRepository.swift b/ios/MullvadSettings/CustomListRepository.swift
index 9688618ac8..700a69c446 100644
--- a/ios/MullvadSettings/CustomListRepository.swift
+++ b/ios/MullvadSettings/CustomListRepository.swift
@@ -37,6 +37,9 @@ public struct CustomListRepository: CustomListRepositoryProtocol {
public init() {}
public func save(list: CustomList) throws {
+ var list = list
+ list.name = list.name.trimmingCharacters(in: .whitespaces)
+
var lists = fetchAll()
if let listWithSameName = lists.first(where: { $0.name.compare(list.name) == .orderedSame }),