Skip to content

Commit

Permalink
Catch error when suspending a tab with a url that 'could not be found'
Browse files Browse the repository at this point in the history
  • Loading branch information
deanoemcke committed Aug 18, 2017
1 parent 2c749d9 commit b19c146
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ var tgs = (function () {
if (gsUtils.getOption(gsUtils.SCREEN_CAPTURE) !== '0') {
chrome.tabs.executeScript(tab.id, { file: 'js/html2canvas.min.js' }, function (result) {

if (chrome.runtime.lastError) {
console.log(chrome.runtime.lastError.message);
return;
}

sendMessageToTab(tab.id, {
action: 'generatePreview',
suspendedUrl: gsUtils.generateSuspendedUrl(tab.url, tab.title, scrollPos),
Expand Down

0 comments on commit b19c146

Please sign in to comment.