File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -619,16 +619,13 @@ addToLibrary({
619619 buffer = buffer . buffer ;
620620 }
621621
622- var data ;
623- #if PTHREADS
624- // WebSockets .send() does not allow passing a SharedArrayBuffer, so clone the portion of the SharedArrayBuffer as a regular
625- // ArrayBuffer that we want to send.
626- if ( buffer instanceof SharedArrayBuffer ) {
627- data = new Uint8Array ( new Uint8Array ( buffer . slice ( offset , offset + length ) ) ) . buffer ;
628- } else {
629- #endif
630- data = buffer . slice ( offset , offset + length ) ;
622+ var data = buffer . slice ( offset , offset + length ) ;
631623#if PTHREADS
624+ // WebSockets .send() does not allow passing a SharedArrayBuffer, so
625+ // clone the portion of the SharedArrayBuffer as a regular ArrayBuffer
626+ // that we want to send.
627+ if ( data instanceof SharedArrayBuffer ) {
628+ data = new Uint8Array ( data ) . buffer ;
632629 }
633630#endif
634631
You can’t perform that action at this time.
0 commit comments