handle Uint8Array in protobuf.convertToTS()

pull/1223/head
Audric Ackermann 5 years ago
parent 2a26f4af50
commit 178060e4d2
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -9,6 +9,12 @@ import ByteBuffer from 'bytebuffer';
export function convertToTS(object: any): any {
// No idea why js `ByteBuffer` and ts `ByteBuffer` differ ...
if (
object &&
object.constructor &&
object.constructor.name === 'Uint8Array'
) {
return object;
} else if (
object &&
object.constructor &&
object.constructor.name === 'ByteBuffer'

Loading…
Cancel
Save