From 3e0605b463c0928537a0999a39b8f68607160643 Mon Sep 17 00:00:00 2001 From: Sam Beveridge Date: Mon, 25 Nov 2019 13:38:05 -0800 Subject: [PATCH] SB: added handler if node is null --- src/serializer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/serializer.ts b/src/serializer.ts index 8791eed..52360ea 100644 --- a/src/serializer.ts +++ b/src/serializer.ts @@ -4,6 +4,7 @@ import { JsonataASTNode, ObjectUnaryNode, ArrayUnaryNode } from "./types"; type AST = JsonataASTNode; export default function serializer(node: AST): string { + if(!node) return undefined; if (node.type === "binary") { return serializer(node.lhs) + " " + node.value + " " + serializer(node.rhs); } else if (node.type === "function") {