Skip to content

Commit

Permalink
Fix bugs: Assign correct value to this.name and this.address
Browse files Browse the repository at this point in the history
  • Loading branch information
evanxd committed Jun 14, 2015
1 parent 0893076 commit 1e16974
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bluetooth_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 1e16974

Please sign in to comment.