@zxing/library
Advanced tools
Comparing version 0.19.2 to 0.19.3
@@ -885,3 +885,9 @@ "use strict"; | ||
var elem = this.getCaptureCanvas(mediaElement); | ||
var ctx = elem.getContext('2d'); | ||
var ctx = void 0; | ||
try { | ||
ctx = elem.getContext('2d', { willReadFrequently: true }); | ||
} | ||
catch (e) { | ||
ctx = elem.getContext('2d'); | ||
} | ||
this.captureCanvasContext = ctx; | ||
@@ -888,0 +894,0 @@ } |
@@ -35,3 +35,3 @@ "use strict"; | ||
MathUtils.round = function (d /*float*/) { | ||
if (NaN === d) | ||
if (isNaN(d)) | ||
return 0; | ||
@@ -38,0 +38,0 @@ if (d <= Number.MIN_SAFE_INTEGER) |
@@ -687,3 +687,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const elem = this.getCaptureCanvas(mediaElement); | ||
const ctx = elem.getContext('2d'); | ||
let ctx; | ||
try { | ||
ctx = elem.getContext('2d', { willReadFrequently: true }); | ||
} | ||
catch (e) { | ||
ctx = elem.getContext('2d'); | ||
} | ||
this.captureCanvasContext = ctx; | ||
@@ -690,0 +696,0 @@ } |
@@ -32,3 +32,3 @@ /* | ||
static round(d /*float*/) { | ||
if (NaN === d) | ||
if (isNaN(d)) | ||
return 0; | ||
@@ -35,0 +35,0 @@ if (d <= Number.MIN_SAFE_INTEGER) |
@@ -882,3 +882,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
var elem = this.getCaptureCanvas(mediaElement); | ||
var ctx = elem.getContext('2d'); | ||
var ctx = void 0; | ||
try { | ||
ctx = elem.getContext('2d', { willReadFrequently: true }); | ||
} | ||
catch (e) { | ||
ctx = elem.getContext('2d'); | ||
} | ||
this.captureCanvasContext = ctx; | ||
@@ -885,0 +891,0 @@ } |
@@ -33,3 +33,3 @@ /* | ||
MathUtils.round = function (d /*float*/) { | ||
if (NaN === d) | ||
if (isNaN(d)) | ||
return 0; | ||
@@ -36,0 +36,0 @@ if (d <= Number.MIN_SAFE_INTEGER) |
{ | ||
"name": "@zxing/library", | ||
"version": "0.19.2", | ||
"version": "0.19.3", | ||
"description": "TypeScript port of ZXing multi-format 1D/2D barcode image processing library.", | ||
@@ -68,3 +68,3 @@ "keywords": [ | ||
"dependencies": { | ||
"ts-custom-error": "^3.0.0" | ||
"ts-custom-error": "^3.2.1" | ||
}, | ||
@@ -71,0 +71,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
128317
0
8286033
Updatedts-custom-error@^3.2.1