From 13608c0a1a5a5625c83f59864ec8326034c28438 Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Tue, 17 Jun 2014 15:05:50 -0700 Subject: fix json.`[]` --- lib/pure/json.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/json.nim b/lib/pure/json.nim index bd5259f95..4e369b854 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -679,8 +679,8 @@ proc `[]`*(node: PJsonNode, name: string): PJsonNode = proc `[]`*(node: PJsonNode, index: int): PJsonNode = ## Gets the node at `index` in an Array. Result is undefined if `index` ## is out of bounds + assert(not isNil(node)) assert(node.kind == JArray) - assert(node != nil) return node.elems[index] proc hasKey*(node: PJsonNode, key: string): bool = -- cgit 1.4.1-2-gfad0