Skip to content

Commit 100db98

Browse files
author
p01
committed
ResourceRequest - minor clean up and fallback data object
1 parent e240fd1 commit 100db98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/resource-manager/resource_display_broker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ cls.ResourceDisplayBroker = function()
3232
var url = ele.getAttribute("data-resource-url");
3333
var line = ele.getAttribute("data-resource-line-number");
3434
var id_or_url = id;
35-
var runtime;
35+
var runtime = runtimes.getRuntime(ele.get_attr("parent-node-chain", "rt-id"));
3636
var data = {};
3737

38-
runtime = runtimes.getRuntime(ele.get_attr("parent-node-chain", "rt-id"));
38+
// get the window_id of the runtime so as to send the correct headers in createRequest
3939
if (runtime)
4040
data.window_id = runtime.window_id;
4141

src/resource-manager/resource_service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ cls.ResourceRequest = function(url, callback, data, resourceInfo)
385385
{
386386
this.url = url;
387387
this.resourceInfo = resourceInfo;
388-
this._data = data;
388+
this._data = data||{};
389389
this._callback = callback;
390390
this._retries = 0;
391391

0 commit comments

Comments
 (0)