urish / web-bluetooth-polyfill

Windows 10 Web Bluetooth Polyfill
76 stars 15 forks source link

Removing a disconnect event listener inside a disconnect event handler can cause an exception #27

Closed urish closed 7 years ago

urish commented 7 years ago

For instance:

polyfill.js:95 Uncaught TypeError: Cannot read property 'call' of undefined
    at BluetoothDevice.dispatchEvent (polyfill.js:95)
    at BluetoothRemoteGATTServer.disconnect (polyfill.js:214)
    at MuseClient.disconnect (st-muse.js:4828)
    at MuseComponent.disconnect (st-muse.js:4921)
    at VNode.click (st-muse.js:4926)
    at invokeHandler (app.core.js:846)
    at handleEvent (app.core.js:840)
    at HTMLButtonElement.handler (app.core.js:832)