From 6599296b2560fddbd63aaa4b45bb920e3fcd0b41 Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Sat, 30 Nov 2019 12:19:27 +0100 Subject: [PATCH] fix: Message sub can be null --- packages/daf-data-store/src/data-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/daf-data-store/src/data-store.ts b/packages/daf-data-store/src/data-store.ts index 2097dd7c2..1d81b2339 100644 --- a/packages/daf-data-store/src/data-store.ts +++ b/packages/daf-data-store/src/data-store.ts @@ -164,7 +164,7 @@ export class DataStore { rowId: `${row.rowid}`, hash: row.hash, iss: { did: row.iss }, - sub: { did: row.sub }, + sub: row.sub ? { did: row.sub } : null, type: row.type, tag: row.tag, data: row.data, @@ -187,7 +187,7 @@ export class DataStore { rowId: `${row.rowid}`, hash: row.hash, iss: { did: row.iss }, - sub: { did: row.sub }, + sub: row.sub ? { did: row.sub } : null, type: row.type, tag: row.tag, jwt: row.jwt,