File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ function serializeInner(
109109 } else if ( value instanceof RegExp ) {
110110 str += `["RegExp",${ JSON . stringify ( value . source ) } , "${ value . flags } "]` ;
111111 } else if ( value instanceof Uint8Array ) {
112- str += `["Uint8Array","${ b64encode ( value ) } "]` ;
112+ str += `["Uint8Array","${ b64encode ( value . buffer ) } "]` ;
113113 } else if ( value instanceof Set ) {
114114 const items = new Array ( value . size ) ;
115115 let i = 0 ;
@@ -161,7 +161,7 @@ const base64abc = [
161161 * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727
162162 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation
163163 */
164- export function b64encode ( buffer : ArrayBuffer ) : string {
164+ export function b64encode ( buffer : ArrayBufferLike ) : string {
165165 const uint8 = new Uint8Array ( buffer ) ;
166166 let result = "" ,
167167 i ;
You can’t perform that action at this time.
0 commit comments