diff --git a/.github/workflows/nodejs-beta.yml b/.github/workflows/nodejs-beta.yml index 1549a07e..3fee5a6b 100644 --- a/.github/workflows/nodejs-beta.yml +++ b/.github/workflows/nodejs-beta.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - - uses: actions/setup-node@v2.3.1 + - uses: actions/setup-node@v2.4.0 with: node-version: 14 - name: npm install @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - - uses: actions/setup-node@v2.3.1 + - uses: actions/setup-node@v2.4.0 with: node-version: 14 registry-url: https://registry.npmjs.org/ diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8bd28458..07efae7d 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.3.1 + uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node-version }} - name: npm install @@ -38,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - - uses: actions/setup-node@v2.3.1 + - uses: actions/setup-node@v2.4.0 with: node-version: 14 # use the minimum required version registry-url: https://registry.npmjs.org/ diff --git a/lib/switchbot.js b/lib/switchbot.js index 6ad0eeed..cfa5ed66 100644 --- a/lib/switchbot.js +++ b/lib/switchbot.js @@ -221,7 +221,7 @@ class Switchbot { } if (id) { id = id.toLowerCase().replace(/\:/g, ''); - ad_id = ad.address.toLowerCase().replace(/[^a-z0-9]/g, ''); + let ad_id = ad.address.toLowerCase().replace(/[^a-z0-9]/g, ''); if (ad_id !== id) { return false; }