fix(variable): Resolving variable as string literal (#168)
In Swift 4, a Substring was returned.
This commit is contained in:
@@ -60,7 +60,7 @@ public struct Variable : Equatable, Resolvable {
|
||||
|
||||
if (variable.hasPrefix("'") && variable.hasSuffix("'")) || (variable.hasPrefix("\"") && variable.hasSuffix("\"")) {
|
||||
// String literal
|
||||
return variable[variable.characters.index(after: variable.startIndex) ..< variable.characters.index(before: variable.endIndex)]
|
||||
return String(variable[variable.characters.index(after: variable.startIndex) ..< variable.characters.index(before: variable.endIndex)])
|
||||
}
|
||||
|
||||
if let number = Number(variable) {
|
||||
|
||||
Reference in New Issue
Block a user