Skip to content

Commit 9c38771

Browse files
author
Clément Le Provost
committed
Fix compilation on iOS < 8.0
1 parent 1143457 commit 9c38771

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Source/Request.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,20 @@ class Request: AsyncOperation {
8484
self.completion = completion
8585
super.init()
8686
// Assign a descriptive name, but let the caller may change it afterwards (in contrast to getter override).
87-
self.name = "Request{\(method) /\(path)}"
87+
if #available(iOS 8.0, *) {
88+
self.name = "Request{\(method) /\(path)}"
89+
}
8890
}
8991

9092
// MARK: - Debug
9193

9294
override var description: String {
9395
get {
94-
return name ?? super.description
96+
if #available(iOS 8.0, *) {
97+
return name ?? super.description
98+
} else {
99+
return super.description
100+
}
95101
}
96102
}
97103

0 commit comments

Comments
 (0)