]> zoso.dev Git - libnemo.git/commitdiff
Assign private property in Safe constructor.
authorChris Duncan <chris@zoso.dev>
Tue, 19 Nov 2024 07:01:57 +0000 (23:01 -0800)
committerChris Duncan <chris@zoso.dev>
Tue, 19 Nov 2024 07:01:57 +0000 (23:01 -0800)
src/lib/safe.ts

index 8654756877403ba8931cf492a198465dec1d3144..e22503f4bde4a0018f28fdfb9d4983e85a431674 100644 (file)
@@ -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.