diff --git a/jwt/private/utils.nim b/jwt/private/utils.nim index 6d255ab..c76ef5d 100644 --- a/jwt/private/utils.nim +++ b/jwt/private/utils.nim @@ -15,7 +15,7 @@ proc checkKeysExists*(node: JsonNode, keys: varargs[string]) = raise newException(KeyError, "$# is not present." % key) proc encodeUrlSafe*(s: openarray[byte]): string = - when NimMajor >= 1 and (NimMinor >= 1 or NimPatch >= 2): + when (NimMajor >= 1 and (NimMinor >= 1 or NimPatch >= 2)) or NimMajor >= 2: result = base64.encode(s) else: result = base64.encode(s, newLine="")