Error messages in Opera caused by Non-Webpage-Tabs (Options, Downloads, etc..)

While still being fully functional, Ghostery on Opera Next x64 12.50 throws an error onto the console when changing to a tab not containing a webpage (i.e. Options, Downloads, etc..)

Error is thrown at function getFoundBugs(tab_url)
=> Unhandled Error: Cannot convert 'tab_url' to object
In line 487:
tab_url = tab_url.replace(/#.*$/, ''); // strip the anchor

Stack trace shows, that error propagation starts in
function updateButton();

The statement
var tab = opera.extension.tabs.getFocused();
executed on non-webpage tabs returns a valid Tab-Object with the url-property being undefined.
So updateBadge(tab.url); will be called with an undefined value.

(Btw: On non-webpage tabs, no buttons are displayed, so a button-update is effectless.)

Maybe you can put the responsible statements in try{}catch(){} blocks if the error is unavoidable. I have to deactivate your extension each time during development just to see my own messages in the console ;)
3 people have
this problem
+1
Reply