Fix compilation on older versions of Nim
This commit is contained in:
parent
30bdf3a14e
commit
5c08e6a774
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue