NativeScript/mlkit

Bug: Selection of Barcode formats not working

cjohn001 opened this issue · 0 comments

If one sets an array of Barcode formats to be detected the formats are not accepted by the plugin. The bug is in the following line

if (value.indexOf(BarcodeFormats.ALL)) {

value.indexOf(BarcodeFormats.ALL) === -1 => which is true for the if clause is to be expected if BarcodeFormats.All is not set but one or several other formats.

You can try with the demo app from here :
https://github.com/cjohn001/mlkit-test
Just run on IOS and set a breakpoint to the linked line.