File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const upload = async (
2020 typeof globalThis . Buffer !== 'undefined' &&
2121 globalThis . Buffer . isBuffer ( image )
2222 ) {
23- file = new Blob ( [ image . buffer ] )
23+ file = new Blob ( [ image ] )
2424 } else {
2525 file = image as Blob
2626 }
Original file line number Diff line number Diff line change 1+ import type { webcrypto } from 'node:crypto'
12let _crypto : any
23import ( 'node:crypto' )
34 . then ( ( c ) => ( _crypto = c ) )
@@ -6,7 +7,8 @@ import('node:crypto')
67
78export function generateUUID ( ) : string | undefined {
89 try {
9- const crypto : Crypto | undefined = ( globalThis as any ) . crypto || _crypto
10+ const crypto : webcrypto . Crypto | undefined =
11+ ( globalThis as any ) . crypto || _crypto
1012 if ( ! crypto ) return undefined
1113 return crypto . randomUUID ( )
1214 } catch { }
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
33 "target" : " ES2022" ,
4- "lib" : [" ES2022" , " DOM " ],
4+ "lib" : [" ES2022" ],
55 "module" : " ESNext" ,
66 "moduleResolution" : " Node" ,
77 "resolveJsonModule" : true ,
You can’t perform that action at this time.
0 commit comments