mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Revert "fix: ReferenceError: regeneratorRuntime is not defined"
This reverts commit84edc08928. Revert "fix ocr can't recognize chinese characters" This reverts commit116cebaea4.
This commit is contained in:
parent
84edc08928
commit
88290b9f5e
5 changed files with 5 additions and 10 deletions
|
|
@ -224,16 +224,11 @@ class FocalPointModal extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
worker.loadLanguage('eng+chi_sim+chi_sim_vert+chi_tra+chi_tra_vert')
|
||||
.then(() => worker.initialize('eng+chi_sim+chi_tra')
|
||||
.then(() => {
|
||||
worker.recognize(media_url)
|
||||
.progress(({ progress }) => this.setState({ progress }))
|
||||
.finally(() => worker.terminate())
|
||||
.then(({ text }) => this.setState({ description: removeExtraLineBreaks(text), dirty: true, detecting: false }))
|
||||
.catch(() => this.setState({ detecting: false }));
|
||||
})
|
||||
);
|
||||
worker.recognize(media_url)
|
||||
.progress(({ progress }) => this.setState({ progress }))
|
||||
.finally(() => worker.terminate())
|
||||
.then(({ text }) => this.setState({ description: removeExtraLineBreaks(text), dirty: true, detecting: false }))
|
||||
.catch(() => this.setState({ detecting: false }));
|
||||
}).catch(() => this.setState({ detecting: false }));
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue