Commit c93a94b0 authored by Romain Courteaud's avatar Romain Courteaud

erp5_document_scanner: prevent passing empty string as device_id

parent 403174a6
Pipeline #8919 passed with stage
in 0 seconds
...@@ -56,7 +56,9 @@ ...@@ -56,7 +56,9 @@
return navigator.mediaDevices.getUserMedia({ return navigator.mediaDevices.getUserMedia({
video: { video: {
deviceId: { deviceId: {
exact: device_id // Prevent passing empty string as device_id
// because it throws OverconstrainedError
exact: device_id || undefined
} }
}, },
audio: false audio: false
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>983.2714.63510.3754</string> </value> <value> <string>983.13237.65489.43861</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1586244257.05</float> <float>1586875663.36</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment