You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
JavaScript critical error at line 166, column 26 in ms-appx://io.cordova.myapp5c88717e/www/plugins/phonegap-plugin-barcodescanner/src/windows/BarcodeScannerProxy.js\n\nSCRIPT1002: Syntax error
Workaround:
replace the arrow function with a regular function, unified diff:
src/windows/BarcodeScannerProxy.js | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git src/windows/BarcodeScannerProxy.js src/windows/BarcodeScannerProxy.js
index cea16d9..a1b6054 100644
--- src/windows/BarcodeScannerProxy.js
+++ src/windows/BarcodeScannerProxy.js
@@ -160,15 +160,18 @@ BarcodeReader.prototype.init = function (capture, width, height) {
var formatsList = BarcodeReader.scanCallArgs.args.length > 0 && BarcodeReader.scanCallArgs.args[0].formats;
if (formatsList) {
+
+ var indexer = function (format) {
+ for (var index in BARCODE_FORMAT) {
+ if (BARCODE_FORMAT[index] === format) {
+ return index;
+ }
+ }
+ }
+
var possibleFormats = formatsList
.split(",")
- .map(format => {
- for (var index in BARCODE_FORMAT) {
- if (BARCODE_FORMAT[index] === format) {
- return index;
- }
- }
- });
+ .map(indexer);
this._zxingReader.possibleFormats = possibleFormats;
}
Merry Christmas!
The text was updated successfully, but these errors were encountered:
Expected Behaviour
application starts without error
Actual Behaviour
application crashes with a syntax error within BarcodeScannerProxy.js
Reproduce Scenario (including but not limited to)
Steps to Reproduce
install the plugin, set to windows x86 platform, start debugging
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Windows 10, Visual studio 2015, Cordova 6.1.1, Msbuild 14, TACO
Plugin version
master origin/master origin/HEAD, SHA-1: 36284b1
Logs taken while reproducing problem
JavaScript critical error at line 166, column 26 in ms-appx://io.cordova.myapp5c88717e/www/plugins/phonegap-plugin-barcodescanner/src/windows/BarcodeScannerProxy.js\n\nSCRIPT1002: Syntax error
Workaround:
replace the arrow function with a regular function, unified diff:
Merry Christmas!
The text was updated successfully, but these errors were encountered: