Ensure the "for" iteration over a dictionary is consistent

This commit is contained in:
David Jennes
2018-09-20 02:59:00 +02:00
parent 275e583e4a
commit fce4e85a63
2 changed files with 10 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ class ForNode : NodeType {
var values: [Any]
if let dictionary = resolved as? [String: Any], !dictionary.isEmpty {
values = dictionary.map { ($0.key, $0.value) }
values = dictionary.sorted { $0.key < $1.key }
} else if let array = resolved as? [Any] {
values = array
} else if let range = resolved as? CountableClosedRange<Int> {