filtering out wildcard domains with no remotes left

This commit is contained in:
tigerbot 2017-05-26 18:18:06 -06:00
parent 8e71ae02cf
commit d82530e1db
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ Devices.list = function (store, servername) {
// first so the one with the biggest natural match with be found first. // first so the one with the biggest natural match with be found first.
var deviceList = []; var deviceList = [];
Object.keys(store).filter(function (pattern) { Object.keys(store).filter(function (pattern) {
return pattern[0] === '*'; return pattern[0] === '*' && store[pattern].length;
}).sort(function (a, b) { }).sort(function (a, b) {
return b.length - a.length; return b.length - a.length;
}).some(function (pattern) { }).some(function (pattern) {