js: count: Don't send request if there are no counters
@@ -24,6 +24,7 @@ module.exports = function () {
var urls = Object.keys(objs);
+ if (urls.length > 0) {
api.count(urls).then(function(rv) {
for (var key in objs) {
if (objs.hasOwnProperty(key)) {
@@ -36,4 +37,5 @@ module.exports = function () {
}
}
});
+ }
};
