Skip to content

Commit 499bfe8

Browse files
author
p01
committed
minor style formatting + removed console.log(...)
1 parent f643315 commit 499bfe8

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/resource-manager/resource_service.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,18 @@ cls.ResourceManagerService = function(view)
116116

117117
this._handle_resource_detail_bound = function(event, target)
118118
{
119-
if (!this._context){ return; }
119+
if (!this._context)
120+
return;
120121

121122
var parent = target.get_ancestor('[data-resource-id]');
122-
if (!parent){ console.log('no parent with data-resource-id for '+target.outerHTML); return; }
123+
if (!parent)
124+
return;
123125

124126
var id = Number( parent.getAttribute('data-resource-id') );
125127
var resource = this.get_resource(id);
126128

127-
if (!resource){ console.log('resource '+id+' not found'); return; }
129+
if (!resource)
130+
return;
128131

129132
cls.ResourceDetailView.instance.show_resource(resource);
130133

@@ -134,7 +137,9 @@ cls.ResourceManagerService = function(view)
134137
this._handle_resource_group_bound = function(event, target)
135138
{
136139
var parent = target.get_ancestor('[data-frame-id]');
137-
if (!parent){ return; }
140+
if (!parent)
141+
return;
142+
138143
var frameID = parent.getAttribute('data-frame-id');
139144
var groupName = parent.getAttribute('data-resource-group');
140145

@@ -178,15 +183,17 @@ cls.ResourceManagerService = function(view)
178183

179184
this.get_resource = function(id)
180185
{
181-
if (!this._context){ return null; }
186+
if (!this._context)
187+
return null;
182188

183189
return this._context.resourcesDict[id];
184190
};
185191

186192

187193
this.get_resource_for_url = function(url)
188194
{
189-
if (!this._context){ return null; }
195+
if (!this._context)
196+
return null;
190197

191198
var id = this._context.resourcesUrlDict[url];
192199
if (id===undefined){ return null; }
@@ -379,7 +386,6 @@ cls.ResourceContext = function(data)
379386
{
380387
opera.postError(ui_strings.S_DRAGONFLY_INFO_MESSAGE +
381388
"Unknown frameID for the resource "+ res.id);
382-
console.log([event,res].map(JSON.stringify).join('\n\n'));
383389
res.invalid = true;
384390
}
385391
}

0 commit comments

Comments
 (0)