File tree Expand file tree Collapse file tree 1 file changed +0
-4
lines changed
Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -126,9 +126,7 @@ export default class OCRClient extends YandexTranslateProvider {
126126 }
127127
128128 let resultData = res . data . data ;
129-
130129 const textToTranslate : string [ ] = [ ] ;
131-
132130 let blocks : OCRFullBlock [ ] = resultData . blocks . map ( ( block ) => {
133131 const text = block . boxes . map ( ( box ) => box . text ) . join ( " " ) ;
134132 textToTranslate . push ( text ) ;
@@ -196,7 +194,6 @@ export default class OCRClient extends YandexTranslateProvider {
196194 buffer . byteOffset ,
197195 buffer . byteOffset + buffer . byteLength ,
198196 ) as ArrayBuffer ;
199-
200197 const fileType = await fileTypeFromBuffer ( arrayBuffer ) ;
201198 if ( ! fileType || ! supportedTypes . includes ( fileType . mime ) ) {
202199 throw new OCRError ( `Unsupported file type: ${ fileType ?. mime } ` ) ;
@@ -213,7 +210,6 @@ export default class OCRClient extends YandexTranslateProvider {
213210 }
214211
215212 const fileUrl = new URL ( url ) as URL ;
216-
217213 const res = await this . fetch ( fileUrl , {
218214 headers : {
219215 ...this . headers ,
You can’t perform that action at this time.
0 commit comments