Skip to content

Commit 87b5d42

Browse files
author
p01
committed
Syntax & minor tests cleanup
1 parent 4f0d74f commit 87b5d42

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/resource-manager/resource_service.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ cls.ResourceManagerService = function(view, network_logger)
8383
return w.saw_main_document;
8484
});
8585

86-
if (ctx.windowList && ctx.windowList.length)
86+
if (ctx.windowList.length)
8787
{
88+
// get all the (non-suppressed) resources
8889
ctx.resourceList = (this._network_logger.get_resources()||[])
8990
.filter(function(v)
9091
{
@@ -93,13 +94,9 @@ cls.ResourceManagerService = function(view, network_logger)
9394

9495
ctx.documentResourceHash = {};
9596

96-
// get all the resources
97+
// mapping of the WindowIDs in the debugging context
9798
var windowID_index = {};
98-
ctx.windowList
99-
.forEach(function(w,i)
100-
{
101-
windowID_index[w.id] = i;
102-
});
99+
ctx.windowList.forEach(function(w,i){ windowID_index[w.id] = i; });
103100

104101

105102
var documentID_index = {};
@@ -212,7 +209,7 @@ cls.ResourceManagerService = function(view, network_logger)
212209
var hash = this. _collapsedHash;
213210
var pivotID = pivot.getAttribute('data-expand-collapse-id');
214211
var pivotIDs = [pivotID];
215-
var collapsed = hash[pivotID] === true?false:true;
212+
var collapsed = !hash[pivotID];
216213

217214
if (event.shiftKey)
218215
pivotIDs.push.apply( pivotIDs, Object.keys(hash).filter( function(p)

0 commit comments

Comments
 (0)