summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 =