You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by rf...@apache.org on 2016/09/21 19:06:44 UTC
incubator-senssoft-useralejs git commit: Removed unnecessary variable
assignment.
Repository: incubator-senssoft-useralejs
Updated Branches:
refs/heads/master 505ca3b41 -> 79a2c1dad
Removed unnecessary variable assignment.
Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/commit/79a2c1da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/79a2c1da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/79a2c1da
Branch: refs/heads/master
Commit: 79a2c1dada863601c5570cccb27767f014ba7a77
Parents: 505ca3b
Author: Rob Foley <ro...@gmail.com>
Authored: Wed Sep 21 15:06:39 2016 -0400
Committer: Rob Foley <ro...@gmail.com>
Committed: Wed Sep 21 15:06:39 2016 -0400
----------------------------------------------------------------------
src/sendLogs.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/79a2c1da/src/sendLogs.js
----------------------------------------------------------------------
diff --git a/src/sendLogs.js b/src/sendLogs.js
index b346004..7aa7323 100644
--- a/src/sendLogs.js
+++ b/src/sendLogs.js
@@ -22,10 +22,9 @@ export function initSender(logs, config) {
export function sendOnInterval(logs, config) {
setInterval(function() {
- var logCount = logs.length;
- if (logCount >= config.logCountThreshold) {
+ if (logs.length >= config.logCountThreshold) {
sendLogs(logs.slice(0), config.url, 0); // Send a copy
- logs.splice(0, logCount); // Clear array reference (no reassignment)
+ logs.splice(0); // Clear array reference (no reassignment)
}
}, config.transmitInterval);
}