fixed ocr null event handling

This commit is contained in:
Maxim Devaev 2024-11-02 18:48:14 +02:00
parent 5aef0a2193
commit 28167c4b45

View File

@ -73,9 +73,13 @@ export function Ocr(__getGeometry) {
/************************************************************************/
self.setState = function(state) {
if (state) {
if (state.enabled !== undefined) {
__enabled = (state.enabled && !tools.browser.is_mobile);
}
} else {
__enabled = false;
}
if (__enabled) {
let el = $("stream-ocr-lang-selector");
el.options.length = 0;