Skip to content

Commit

Permalink
chore: use chrome.tabs.reload (#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
seia-soto authored Feb 27, 2024
1 parent 5cb7164 commit 237b125
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 237b125

Please sign in to comment.