From 73bef00dd33665c0fd7ffde13f1cb0a639a40390 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 8 Feb 2024 05:39:31 +0000 Subject: [PATCH] Handle record attributes with null values (#56) Part of https://git.vdb.to/cerc-io/laconicd/issues/144 Reviewed-on: https://git.vdb.to/cerc-io/laconic-sdk/pulls/56 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- package.json | 2 +- src/util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5241dc9..0397190 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/laconic-sdk", - "version": "0.1.14", + "version": "0.1.15", "main": "dist/index.js", "types": "dist/index.d.ts", "repository": "git@github.com:cerc-io/laconic-sdk.git", diff --git a/src/util.ts b/src/util.ts index 222742d..f55d62d 100644 --- a/src/util.ts +++ b/src/util.ts @@ -79,7 +79,7 @@ export class Util { const res: {[key: string]: any} = {}; attributes.forEach(attr => { - res[attr.key] = this.fromGQLValue(attr.value); + res[attr.key] = (attr.value === null) ? null : this.fromGQLValue(attr.value); }); return res;