Skip to content

Commit a254f65

Browse files
committed
fixed errors and updated actions
1 parent 7631880 commit a254f65

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
21-
- uses: actions/setup-node@v2
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-node@v3
2222
with:
2323
node-version: 18
2424

.github/workflows/npmpublish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
1616
with:
1717
node-version: 18
1818

@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
name: pack-artifact
6060

61-
- uses: actions/setup-node@v2
61+
- uses: actions/setup-node@v3
6262
with:
6363
node-version: 18
6464
registry-url: https://registry.npmjs.org/

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zxing/browser",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "ZXing for JS's browser layer.",
55
"keywords": [
66
"reader",
@@ -62,7 +62,7 @@
6262
"devDependencies": {
6363
"@rollup/plugin-node-resolve": "^13.1.3",
6464
"@types/chai": "^4.3.0",
65-
"@zxing/library": "^0.20.0",
65+
"@zxing/library": "^0.21.0",
6666
"chai": "^4.3.6",
6767
"cypress": "^9.4.1",
6868
"eslint": "^8.8.0",

src/readers/BrowserCodeReader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,13 +1032,13 @@ export class BrowserCodeReader {
10321032
/**
10331033
* The HTML canvas element context.
10341034
*/
1035-
let captureCanvasContext;
1035+
let captureCanvasContext: any;
10361036
try {
1037-
captureCanvasContext = elem.getContext('2d', { willReadFrequently: true }) as CanvasRenderingContext2D;
1037+
captureCanvasContext = captureCanvas.getContext('2d', { willReadFrequently: true }) as CanvasRenderingContext2D;
10381038
} catch (e) {
1039-
captureCanvasContext = elem.getContext('2d');
1039+
captureCanvasContext = captureCanvas.getContext('2d');
10401040
}
1041-
1041+
10421042
// cannot proceed w/o this
10431043
if (!captureCanvasContext) {
10441044
throw new Error('Couldn\'t create canvas for visual element scan.');

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@
282282
dependencies:
283283
"@types/node" "*"
284284

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

0 commit comments

Comments
 (0)