Skip to content

Commit

Permalink
chore: use chrome.tabs.reload
Browse files Browse the repository at this point in the history
  • Loading branch information
seia-soto committed Feb 20, 2024
1 parent 2f2e4fa commit c196763
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extension-manifest-v2/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,19 @@ function reloadTab(data) {
if (data && data.tab_id) {
utils.getTab(data.tab_id, (tab) => {
if (tab && tab.url) {
chrome.tabs.update(tab.id, { url: tab.url });
chrome.tabs.reload(tab.id);
}
}, () => {
utils.getActiveTab((tab) => {
if (tab && tab.url) {
chrome.tabs.update(tab.id, { url: tab.url });
chrome.tabs.reload(tab.id);
}
});
});
} else {
utils.getActiveTab((tab) => {
if (tab && tab.url) {
chrome.tabs.update(tab.id, { url: tab.url });
chrome.tabs.reload(tab.id);
}
});
}
Expand Down

0 comments on commit c196763

Please sign in to comment.