File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -38,19 +38,7 @@ const HEAD_BYTE_REQUIRED = -1;
3838const EMPTY_VIEW = new DataView ( new ArrayBuffer ( 0 ) ) ;
3939const EMPTY_BYTES = new Uint8Array ( EMPTY_VIEW . buffer ) ;
4040
41- // IE11: Hack to support IE11.
42- // IE11: Drop this hack and just use RangeError when IE11 is obsolete.
43- export const DataViewIndexOutOfBoundsError : typeof Error = ( ( ) => {
44- try {
45- // IE11: The spec says it should throw RangeError,
46- // IE11: but in IE11 it throws TypeError.
47- EMPTY_VIEW . getInt8 ( 0 ) ;
48- } catch ( e : any ) {
49- return e . constructor ;
50- }
51- throw new Error ( "never reached" ) ;
52- } ) ( ) ;
53-
41+ export const DataViewIndexOutOfBoundsError = RangeError ;
5442const MORE_DATA = new DataViewIndexOutOfBoundsError ( "Insufficient data" ) ;
5543
5644const sharedCachedKeyDecoder = new CachedKeyDecoder ( ) ;
You can’t perform that action at this time.
0 commit comments