Commit 93ba6947 authored by Alan Szlosek's avatar Alan Szlosek

no need to create Date if we're not going to use it

parent a10562e2
Pipeline #15482785 passed with stage
in 1 minute and 41 seconds
......@@ -34,13 +34,14 @@ var Digest = function(pattern, cacheSize, deliveryCallback) {
// SCHEDULING STUFF
var _intervalCallback = function() {
var now = new Date();
var now;
if (!self.pattern) {
self.deliveryCallback(self.counts, self.cache);
self.counts = {};
self.cache = {};
return;
}
now = new Date();
if (now.toISOString().match(self.pattern)) {
self.deliveryCallback(self.counts, self.cache);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment