summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVarriount <Varriount@users.noreply.github.com>2014-06-18 17:36:32 -0400
committerVarriount <Varriount@users.noreply.github.com>2014-06-18 17:36:32 -0400
commit390bbbdd051d34e6b1bc793af924a71fcc9b952e (patch)
tree5ebf17469d7898070c93bde5d82a52d79e601024
parentebff5f1f28ecc31a64ca9804c9a9a3ef4ba8e916 (diff)
parent13608c0a1a5a5625c83f59864ec8326034c28438 (diff)
downloadNim-390bbbdd051d34e6b1bc793af924a71fcc9b952e.tar.gz
Merge pull request #1283 from fowlmouth/patch-4
fix json.`[]`
-rw-r--r--lib/pure/json.nim2
1 files changed, 1 insertions, 1 deletions
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 =