Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Oct 6, 2023
1 parent fd45a03 commit f9e9937
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -2732,7 +2732,7 @@ const API = {
return resolve(d.tweetDetails[id].data);
}
if(loadingDetails[id]) {
return loadingDetails[id].listeners.push([resolve, reject]);
if(!useDiffKey) return loadingDetails[id].listeners.push([resolve, reject]);
} else {
loadingDetails[id] = {
listeners: []
Expand Down Expand Up @@ -2763,7 +2763,8 @@ const API = {
if (data.errors && data.errors[0]) {
if(data.errors[0].code === 88 && !useDiffKey) {
localStorage.hitRateLimit = Date.now() + 600000;
return resolve(tweet.getV2(id, true));
API.tweet.getV2(id, true).then(resolve).catch(reject);
return;
}
if(loadingDetails[id]) loadingDetails[id].listeners.forEach(l => l[1](data.errors[0].message));
delete loadingDetails[id];
Expand Down

0 comments on commit f9e9937

Please sign in to comment.