From 5c08e6a774f428b4193a33e0400729c279ded07c Mon Sep 17 00:00:00 2001 From: Zed Date: Tue, 22 Aug 2023 02:27:44 +0200 Subject: [PATCH] Fix compilation on older versions of Nim --- src/parserutils.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parserutils.nim b/src/parserutils.nim index c65052e..7cf696e 100644 --- a/src/parserutils.nim +++ b/src/parserutils.nim @@ -36,7 +36,8 @@ template with*(ident, value, body): untyped = template with*(ident; value: JsonNode; body): untyped = if true: let ident {.inject.} = value - if value.notNull: body + # value.notNull causes a compilation error for versions < 1.6.14 + if notNull(value): body template getCursor*(js: JsonNode): string = js{"content", "operation", "cursor", "value"}.getStr