Skip to content

Commit 27036ed

Browse files
author
Marco Crespi
committed
Merge branch 'develop'
2 parents d3dc1a9 + ba32d1c commit 27036ed

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/bindings/win/gatt/Characteristic.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/bindings/win/gatt/Characteristic.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bindings/win/gatt/Characteristic.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class WinGattCharacteristic extends GattCharacteristic {
6464
const handler = (dev: string, srv: string, char: string, err: Error) => {
6565
if (dev === this.service.gatt.peripheral.uuid && srv === this.service.uuid && char === this.uuid) {
6666
noble.off('write', handler);
67-
if (err) {
67+
if (err instanceof Error) {
6868
reject(err);
6969
} else {
7070
resolve();
@@ -88,7 +88,7 @@ export class WinGattCharacteristic extends GattCharacteristic {
8888
const handler = (dev: string, srv: string, char: string, err: Error) => {
8989
if (dev === this.service.gatt.peripheral.uuid && srv === this.service.uuid && char === this.uuid) {
9090
noble.off('notify', handler);
91-
if (err) {
91+
if (err instanceof Error) {
9292
reject(err);
9393
} else {
9494
resolve();

0 commit comments

Comments
 (0)