From 9045786d9aebcfaa01a595db2bcae696f1efa539 Mon Sep 17 00:00:00 2001 From: Ludea Date: Wed, 15 Feb 2023 08:31:08 +0100 Subject: [PATCH] [stronghold] return null if there is no record --- plugins/stronghold/guest-js/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/stronghold/guest-js/index.ts b/plugins/stronghold/guest-js/index.ts index 3339f87f..44a4a831 100644 --- a/plugins/stronghold/guest-js/index.ts +++ b/plugins/stronghold/guest-js/index.ts @@ -298,7 +298,14 @@ export class Store { snapshotPath: this.path, client: this.client, key: toBytesDto(key), - }).then((v) => Uint8Array.from(v)); + }).then((v) => { + if (v !== null || undefined) { + Uint8Array.from(v); + } + else { + null + } + }) } async insert(