Fix IE 11 handshake split (#4575)

This commit is contained in:
BrennanConroy 2018-12-13 21:30:17 -08:00 committed by GitHub
parent 59ada30959
commit 4950495dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ if (!Uint8Array.prototype.indexOf) {
}
if (!Uint8Array.prototype.slice) {
Object.defineProperty(Uint8Array.prototype, "slice", {
value: Array.prototype.slice,
// wrap the slice in Uint8Array so it looks like a Uint8Array.slice call
value: (start?: number, end?: number) => new Uint8Array(Array.prototype.slice(start, end)),
writable: true,
});
}