File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,9 +75,10 @@ export class InteractionOutput implements WoT.InteractionOutput {
7575
7676 const data = await this . #content. toBuffer ( ) ;
7777 this . dataUsed = true ;
78- this . #buffer = data ;
78+ // this.#buffer = new Uint8Array(data).buffer
79+ this . #buffer = data as unknown as ArrayBuffer ;
7980
80- return data ;
81+ return this . #buffer ;
8182 }
8283
8384 async value < T extends WoT . DataSchemaValue > ( ) : Promise < T > {
@@ -120,7 +121,8 @@ export class InteractionOutput implements WoT.InteractionOutput {
120121 // read fully the stream
121122 const bytes = await this . #content. toBuffer ( ) ;
122123 this . dataUsed = true ;
123- this . #buffer = bytes ;
124+ // this.#buffer = new Uint8Array(bytes).buffer;
125+ this . #buffer = bytes as unknown as ArrayBuffer ;
124126
125127 const json = ContentSerdes . get ( ) . contentToValue ( { type : this . #content. type , body : bytes } , this . schema ) ;
126128
You can’t perform that action at this time.
0 commit comments