зеркало из https://github.com/mozilla/lightbeam.git
fix summary to work with array values
This commit is contained in:
Родитель
b84c3a67e5
Коммит
f1c56f5ea7
|
@ -36,7 +36,8 @@ function OnInit(connections){
|
|||
}
|
||||
|
||||
|
||||
function onConnection(){
|
||||
function onConnection(conn){
|
||||
var connection = aggregate.connectionAsObject(conn);
|
||||
aggregate.emit('connection', connection);
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ function attachToCollusionPage(worker) {
|
|||
});
|
||||
|
||||
worker.port.on("summarize", function(){
|
||||
var firstTimestamp = new Date(allConnections[0].timestamp);
|
||||
var firstTimestamp = new Date(allConnections[0].timestamp || allConnections[0][Connection.TIMESTAMP]);
|
||||
var localTimeSince = firstTimestamp.getFullYear() + "-" +
|
||||
("0" + (firstTimestamp.getMonth() + 1)).slice(-2) + "-" + // make sure the following are in 2-digit format
|
||||
("0" + firstTimestamp.getDate()).slice(-2) + " " +
|
||||
|
|
Загрузка…
Ссылка в новой задаче