Add null check

This commit is contained in:
Thomas E Lackey 2024-02-28 21:55:13 -06:00
parent fedf35d702
commit 39186e2f08
2 changed files with 5 additions and 1 deletions

View File

@ -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",

View File

@ -86,6 +86,10 @@ export class Util {
}
static fromGQLValue(obj: any) {
if (null == obj) {
return null;
}
// Get first non-null key
const present = Object.keys(obj).find(k => obj[k] !== null);
if (present === undefined) {