File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1010
1111 exports . encode = function ( arraybuffer ) {
1212 var bytes = new Uint8Array ( arraybuffer ) ,
13- i , len = bytes . buffer . byteLength , base64 = "" ;
13+ i , len = bytes . length , base64 = "" ;
1414
1515 for ( i = 0 ; i < len ; i += 3 ) {
16- base64 += chars [ bytes . buffer [ i ] >> 2 ] ;
17- base64 += chars [ ( ( bytes . buffer [ i ] & 3 ) << 4 ) | ( bytes . buffer [ i + 1 ] >> 4 ) ] ;
18- base64 += chars [ ( ( bytes . buffer [ i + 1 ] & 15 ) << 2 ) | ( bytes . buffer [ i + 2 ] >> 6 ) ] ;
19- base64 += chars [ bytes . buffer [ i + 2 ] & 63 ] ;
16+ base64 += chars [ bytes [ i ] >> 2 ] ;
17+ base64 += chars [ ( ( bytes [ i ] & 3 ) << 4 ) | ( bytes [ i + 1 ] >> 4 ) ] ;
18+ base64 += chars [ ( ( bytes [ i + 1 ] & 15 ) << 2 ) | ( bytes [ i + 2 ] >> 6 ) ] ;
19+ base64 += chars [ bytes [ i + 2 ] & 63 ] ;
2020 }
2121
2222 if ( ( len % 3 ) === 2 ) {
5656
5757 return arraybuffer ;
5858 } ;
59- } ) ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ) ;
59+ } ) ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ) ;
You can’t perform that action at this time.
0 commit comments