webbluetooth
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -187,2 +187,4 @@ "use strict"; | ||
const baseDevice = this.deviceHandles[handle]; | ||
baseDevice.removeAllListeners("connect"); | ||
baseDevice.removeAllListeners("disconnect"); | ||
baseDevice.once("connect", connectFn); | ||
@@ -199,3 +201,4 @@ baseDevice.once("disconnect", () => { | ||
disconnect(handle, errorFn) { | ||
this.deviceHandles[handle].disconnect(this.checkForError(errorFn)); | ||
const baseDevice = this.deviceHandles[handle]; | ||
baseDevice.disconnect(this.checkForError(errorFn)); | ||
} | ||
@@ -202,0 +205,0 @@ discoverServices(handle, serviceUUIDs, completeFn, errorFn) { |
{ | ||
"name": "webbluetooth", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Node.js implementation of the Web Bluetooth Specification", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/thegecko/webbluetooth", |
@@ -229,2 +229,4 @@ /* | ||
const baseDevice = this.deviceHandles[handle]; | ||
baseDevice.removeAllListeners("connect"); | ||
baseDevice.removeAllListeners("disconnect"); | ||
baseDevice.once("connect", connectFn); | ||
@@ -242,3 +244,4 @@ baseDevice.once("disconnect", () => { | ||
public disconnect(handle: string, errorFn?: (errorMsg: string) => void): void { | ||
this.deviceHandles[handle].disconnect(this.checkForError(errorFn)); | ||
const baseDevice = this.deviceHandles[handle]; | ||
baseDevice.disconnect(this.checkForError(errorFn)); | ||
} | ||
@@ -245,0 +248,0 @@ |
Sorry, the diff of this file is not supported yet
1278199
5742