mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
fix: ReferenceError: regeneratorRuntime is not defined
This commit is contained in:
parent
116cebaea4
commit
84edc08928
1 changed files with 10 additions and 9 deletions
|
|
@ -224,15 +224,16 @@ class FocalPointModal extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
(async () => {
|
||||
await worker.loadLanguage('eng+chi_sim+chi_sim_vert+chi_tra+chi_tra_vert');
|
||||
await worker.initialize('eng+chi_sim+chi_tra');
|
||||
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.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 }));
|
||||
})
|
||||
);
|
||||
}).catch(() => this.setState({ detecting: false }));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue