Fix IfNode when using Array of arbitrary types (which made the cast to [AnyObject] fail)

This commit is contained in:
Olivier Halligon
2015-10-26 14:26:41 +01:00
parent 8ac6e26876
commit ba65ab5fbe
2 changed files with 15 additions and 1 deletions

View File

@@ -230,7 +230,7 @@ public class IfNode : NodeType {
let result = try variable.resolve(context)
var truthy = false
if let result = result as? [AnyObject] {
if let result = result as? NSArray {
if result.count > 0 {
truthy = true
}