Skip to content
Snippets Groups Projects
Commit 77d860d1 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Merge branch 'fix-error-on-no-video' into 'master'

Handle the case of no video device being found

See merge request !3
parents 545c1444 63aba5b7
No related branches found
No related tags found
1 merge request!3Handle the case of no video device being found
Pipeline #13488 passed
......@@ -120,7 +120,7 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
that.activeCamera = 'environment';
} else {
that.activeCamera = Array.from(devices_map)[0][0];
that.activeCamera = devices_map.size ? Array.from(devices_map)[0][0] : '';
}
})
.catch(function (err) {
......@@ -146,7 +146,7 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
that.activeCamera = 'environment';
} else {
that.activeCamera = Array.from(devices_map)[0][0];
that.activeCamera = devices_map.size ? Array.from(devices_map)[0][0] : '';
}
resolve(results);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment