]> git.codecow.com Git - libnemo.git/commitdiff
Allow undefined input for account rep.
authorChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 18:50:30 +0000 (11:50 -0700)
committerChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 18:50:30 +0000 (11:50 -0700)
src/lib/account.ts

index cfb7d081f7404ede61fc4ad2caf49aa854428cc4..f624d0b55e85974d550d2866e6589a6345199949 100644 (file)
@@ -81,7 +81,7 @@ export class Account {
        set open_block (v: string | undefined) { this.#open_block = v }\r
        set receivable (v: bigint | number | string) { this.#receivable = BigInt(v) }\r
        set representative (v: unknown) {\r
-               if (v instanceof Account) {\r
+               if (v instanceof Account || v === undefined) {\r
                        this.#representative = v\r
                } else if (typeof v === 'string') {\r
                        this.#representative = Account.load(v)\r