This commit is contained in:
Gwendal Roué committed 2018-04-19 21:48:12 +02:00
1 parent b550e2bfd5
commit e45642b6c1
1 file changed
+4 -4
+4 -4
View File
@@ -1160,11 +1160,11 @@ extension Row {
public subscript(_ name: String) -> Row? {
var fifo = Array(scopes)
while !fifo.isEmpty {
let node = fifo.removeFirst()
if node.name == name {
return node.row
let scope = fifo.removeFirst()
if scope.name == name {
return scope.row
}
fifo.append(contentsOf: node.row.scopes)
fifo.append(contentsOf: scope.row.scopes)
}
return nil
}