mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-04-14 23:50:33 +03:00
Fix an issue with cached request checking while not in a channel in tracker
This commit is contained in:
parent
5c1f03c5f3
commit
22a451ff76
@ -56,7 +56,7 @@ DISCORD.setupMessageRequestHook((channel, messages) => {
|
||||
STATE.onStateChanged((type, detail) => {
|
||||
if (type === "tracking" && detail){
|
||||
var info = DISCORD.getSelectedChannel();
|
||||
var isCachedRequestValid = cachedRequest && cachedRequest.channel == info.id;
|
||||
var isCachedRequestValid = cachedRequest && info && cachedRequest.channel == info.id;
|
||||
|
||||
if (untrackedRequests > 1 || (untrackedRequests === 1 && !isCachedRequestValid)){
|
||||
if (!confirm("You have "+untrackedRequests+" untracked request"+(untrackedRequests === 1 ? "" : "s")+", some messages may not be saved until you refresh the page. Do you want to proceed anyway?")){
|
||||
|
Loading…
x
Reference in New Issue
Block a user