We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 663143d commit b66363eCopy full SHA for b66363e
1 file changed
src/comms/isocket-comms.js
@@ -99,7 +99,16 @@ class ISocketComms extends EventEmitter {
99
debug('decrypting quantum aes')
100
console.log(reply, typeof reply)
101
102
- const contentBSON = await this.aesStream.decrypt( new Uint8Array(reply.data) )
+ let buf = reply
103
+
104
+ if(buf instanceof Blob){
105
+ debug('reply is a blob')
106
+ buf = await reply.arrayBuffer();
107
+ } else {
108
+ buf = reply.data
109
+ }
110
111
+ const contentBSON = await this.aesStream.decrypt( new Uint8Array(buf) )
112
const content = Routines.BSON.parseObject(new Routines.BSON.BaseParser( contentBSON ))
113
114
return content
0 commit comments