From 4e281715cf52c7464a0e0f5c71e225e0fcede6ef Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 14 Mar 2015 14:59:39 -0400 Subject: [PATCH] this fixes #1012 --- src/js/messaging.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/messaging.js b/src/js/messaging.js index ed598fbb6..eea5110a2 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -282,7 +282,8 @@ var onMessage = function(request, sender, callback) { switch ( request.what ) { case 'getPopupData': vAPI.tabs.get(request.tabId, function(tab) { - callback(getStats(getTargetTabId(tab), tab.title)); + // https://github.com/gorhill/uBlock/issues/1012 + callback(getStats(getTargetTabId(tab), tab ? tab.title : '')); }); return;