Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Add fallback for broken chrome.tabs.reload #40
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed Jan 5, 2018
1 parent fd6717a commit df477b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions platform/edge/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,10 @@ vAPI.tabs.reload = function(tabId /*, flags*/) {
try {
chrome.tabs.reload(tabId, onReloaded);
} catch ( err ) {
console.warn('Edge does not support reloading tabs');
console.log(err);
// Apply fallback solution
vAPI.tabs.injectScript(tabId, {
code: ';window.location.href = window.location.href;'
});
}
};

Expand Down

0 comments on commit df477b1

Please sign in to comment.