Skip to content

Commit f71d12a

Browse files
author
Daniel Herzog
committed
Fixed resource-update message, carries entry's id now
1 parent 93097fa commit f71d12a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/network/network_service.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cls.NetworkLogger = function()
1111
{
1212
// ids is an optional array of entry ids.
1313
var ctx = this.get_logger_context();
14-
var entries = ctx.get_entries(true);
14+
var entries = ctx && ctx.get_entries(true) || [];
1515
if (ids)
1616
{
1717
var filter_bound = this._filter_entries_by_list.bind(this, ids);
@@ -580,11 +580,7 @@ cls.RequestContextPrototype = function()
580580
window_context.entry_ids.push(id);
581581
}
582582
logger_entry.update(eventname, event);
583-
584-
if (!this.is_paused)
585-
{
586-
this.post_on_context_or_logger("resource-update", {id: event.resourceID});
587-
}
583+
this.post_on_context_or_logger("resource-update", {id: logger_entry.id});
588584
};
589585

590586
this.post_on_context_or_logger = function(name, body)
@@ -1153,7 +1149,7 @@ cls.NetworkLoggerEntryPrototype = function()
11531149
{
11541150
this.get_body_unsuccessful = this._current_response.logger_entry_get_body_unsuccessful = true;
11551151
}
1156-
window.messages.post("network-resource-updated", {id: this.resource_id});
1152+
this.post_on_context_or_logger("resource-update", {id: this.id});
11571153
};
11581154

11591155
this.__defineGetter__("duration", function()

0 commit comments

Comments
 (0)