fix(browser-extension): issues fetch every popup open
This commit is contained in:
parent
263d827259
commit
7d611b5ea2
@ -229,7 +229,7 @@ async function refreshData(attempt = 1) {
|
|||||||
async function refreshIssue(hostname, attempt = 1) {
|
async function refreshIssue(hostname, attempt = 1) {
|
||||||
if (attempt <= 3) {
|
if (attempt <= 3) {
|
||||||
try {
|
try {
|
||||||
const { data } = await requestManager.fetch(`${apiUrl}/issues/${hostname}/`);
|
const { data = {} } = await requestManager.fetch(`${apiUrl}/issues/${hostname}/`);
|
||||||
|
|
||||||
if (Object.keys(data).length === 0) {
|
if (Object.keys(data).length === 0) {
|
||||||
await updateStore(hostname, { issue: { expiresIn: Date.now() + 8 * 60 * 60 * 1000 } });
|
await updateStore(hostname, { issue: { expiresIn: Date.now() + 8 * 60 * 60 * 1000 } });
|
||||||
|
Loading…
Reference in New Issue
Block a user