diff --git a/packages/core/src/interaction-output.ts b/packages/core/src/interaction-output.ts index 68f2bf908..21b0b58d1 100644 --- a/packages/core/src/interaction-output.ts +++ b/packages/core/src/interaction-output.ts @@ -77,9 +77,11 @@ export class InteractionOutput implements WoT.InteractionOutput { return data; } - async value(): Promise { + async value(): Promise { // the value has been already read? - if (this.parsedValue != null) return this.parsedValue as T; + if (this.parsedValue !== undefined) { + return this.parsedValue as T; + } if (this.dataUsed) { throw new Error("Can't read the stream once it has been already used");