diff --git a/lib/bluetooth_helper.js b/lib/bluetooth_helper.js index e1394c3..49101a6 100644 --- a/lib/bluetooth_helper.js +++ b/lib/bluetooth_helper.js @@ -8,9 +8,9 @@ var bluetooth = navigator.mozBluetooth; function BluetoothHelper(options) { - this.name = options && options.name; - this.address = options && options.address; - if (this.name || this.address) { + if (options && (options.name || options.address)) { + this.name = options.name; + this.address = options.address; bluetooth.addEventListener('attributechanged', this._handleAttributechanged.bind(this)); }