Skip to content

Commit

Permalink
fixed errors and updated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
werthdavid committed May 22, 2024
1 parent 7631880 commit a254f65
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
with:
name: pack-artifact

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zxing/browser",
"version": "0.1.4",
"version": "0.1.5",
"description": "ZXing for JS's browser layer.",
"keywords": [
"reader",
Expand Down Expand Up @@ -62,7 +62,7 @@
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.1.3",
"@types/chai": "^4.3.0",
"@zxing/library": "^0.20.0",
"@zxing/library": "^0.21.0",
"chai": "^4.3.6",
"cypress": "^9.4.1",
"eslint": "^8.8.0",
Expand Down
8 changes: 4 additions & 4 deletions src/readers/BrowserCodeReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1032,13 +1032,13 @@ export class BrowserCodeReader {
/**
* The HTML canvas element context.
*/
let captureCanvasContext;
let captureCanvasContext: any;
try {
captureCanvasContext = elem.getContext('2d', { willReadFrequently: true }) as CanvasRenderingContext2D;
captureCanvasContext = captureCanvas.getContext('2d', { willReadFrequently: true }) as CanvasRenderingContext2D;
} catch (e) {
captureCanvasContext = elem.getContext('2d');
captureCanvasContext = captureCanvas.getContext('2d');
}

// cannot proceed w/o this
if (!captureCanvasContext) {
throw new Error('Couldn\'t create canvas for visual element scan.');
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@
dependencies:
"@types/node" "*"

"@zxing/library@^0.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@zxing/library/-/library-0.20.0.tgz#11bc411b87693015389555c589da61532879be7b"
integrity sha512-6Ev6rcqVjMakZFIDvbUf0dtpPGeZMTfyxYg4HkVWioWeN7cRcnUWT3bU6sdohc82O1nPXcjq6WiGfXX2Pnit6A==
"@zxing/library@^0.21.0":
version "0.21.0"
resolved "https://registry.yarnpkg.com/@zxing/library/-/library-0.21.0.tgz#f20377c394f7023d11a740697cc57dd70b49eaa9"
integrity sha512-2+DFYM6NLl+ZXXUbDOkmVn4TAAOgTniEx5MJD2kStujcxSl6j9CfAgIT8DcsBYIlT5DW7oeiShEzWZjpL0hNOw==
dependencies:
ts-custom-error "^3.2.1"
optionalDependencies:
Expand Down

0 comments on commit a254f65

Please sign in to comment.