From 1731241421f99978b6fc4088b03bd1e8248dbb8e Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Mon, 18 Nov 2024 23:01:57 -0800 Subject: [PATCH] Assign private property in Safe constructor. --- src/lib/safe.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/safe.ts b/src/lib/safe.ts index 8654756..e22503f 100644 --- a/src/lib/safe.ts +++ b/src/lib/safe.ts @@ -7,7 +7,11 @@ const { subtle } = globalThis.crypto const ERR_MSG = 'Failed to store item in Safe' export class Safe { - #storage = globalThis.sessionStorage + #storage: Storage + + constructor () { + this.#storage = globalThis.sessionStorage + } /** * Encrypts data with a password and stores it in the Safe. -- 2.34.1