Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/MiniDroneBtAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class MiniDroneBtAdapter extends EventEmitter {
const manufacturer = peripheral.advertisement.manufacturerData;
const matchesFilter = localName === this.options.droneFilter;

const localNameMatch = matchesFilter || DRONE_PREFIXES.some((prefix) => localName.indexOf(prefix) >= 0);
const localNameMatch = matchesFilter || (typeof localName != 'undefined' && DRONE_PREFIXES.some((prefix) => localName.indexOf(prefix) >= 0));
const manufacturerMatch = manufacturer && (MANUFACTURER_SERIALS.indexOf(manufacturer) >= 0);

// Is TRUE according to droneFilter or if empty, for EITHER an "RS_" name OR manufacturer code.
Expand Down