taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit a3feb4c9f3eb133b856440365a9b1eee421e707b
parent d826e278d0cc8c343532b5488967ff7602afc198
Author: Florian Dold <florian@dold.me>
Date:   Sun, 24 Aug 2025 15:36:41 +0200

util: allow undefined tags

Diffstat:
Mpackages/taler-util/src/codec.ts | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/codec.ts b/packages/taler-util/src/codec.ts @@ -115,7 +115,7 @@ class ObjectCodecBuilder<OutputType, PartialOutputType> { return this as any; } - /** + /** * Define a property for the object. */ propertyStrict<K extends keyof OutputType & string>( @@ -282,7 +282,7 @@ class UnionCodecBuilder< }; } const d = x[discriminator]; - if (d === undefined) { + if (d === undefined && !alternatives.has(d)) { throw new DecodingError( `expected tag for ${objectDisplayName} at ${renderContext( c,