diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9246761a..326d6757 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,9 +17,9 @@ jobs: node-version: [16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' diff --git a/src/platform/vcs.ts b/src/platform/vcs.ts index bbe2c7af..e11d274e 100644 --- a/src/platform/vcs.ts +++ b/src/platform/vcs.ts @@ -439,7 +439,9 @@ class VCSPlatform extends BasePlatform { const {x,y} = this.getRasterCanvasPosition(); if (x >= 0 || y >= 0) { const ctx = this.canvas.getContext('2d'); - drawCrosshair(ctx, x, y, 2); + if (ctx) { + drawCrosshair(ctx, x, y, 2); + } } } };