diff options
| author | sainaen | 2013-05-06 22:38:37 +0300 |
|---|---|---|
| committer | sainaen | 2013-05-06 22:43:26 +0300 |
| commit | 967add12242bc2ce85ee57536a1c886ea8d56c66 (patch) | |
| tree | e3cc17d6eabb5b0e91c76ac3857517661ebe6a44 /content_scripts | |
| parent | 81567c3ce1eee182f63dbdf08647e9a111887b43 (diff) | |
| download | vimium-967add12242bc2ce85ee57536a1c886ea8d56c66.tar.bz2 | |
Content script should handle message even when there is no tab property
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 1263239c..676014f5 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -121,7 +121,7 @@ initializePreDomReady = -> chrome.extension.onMessage.addListener (request, sender, sendResponse) -> # in the options page, we will receive requests from both content and background scripts. ignore those # from the former. - return unless sender.tab?.url.startsWith 'chrome-extension://' + return if sender.tab and not sender.tab.url.startsWith 'chrome-extension://' return unless isEnabledForUrl or request.name == 'getActiveState' sendResponse requestHandlers[request.name](request, sender) # Ensure the sendResponse callback is freed. |
