diff --git a/plugins/stronghold/guest-js/index.ts b/plugins/stronghold/guest-js/index.ts index 9272f9a99..26c03958d 100644 --- a/plugins/stronghold/guest-js/index.ts +++ b/plugins/stronghold/guest-js/index.ts @@ -293,12 +293,18 @@ export class Store { this.client = client; } - async get(key: StoreKey): Promise { + async get(key: StoreKey): Promise { return await invoke("plugin:stronghold|get_store_record", { snapshotPath: this.path, client: this.client, key: toBytesDto(key), - }).then((v) => Uint8Array.from(v)); + }).then((v) => { + if (v) { + return Uint8Array.from(v); + } else { + return null; + } + }); } async insert(