1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-21 14:47:41 +01:00

Fix always success

This commit is contained in:
Jip Fr 2023-12-30 12:45:10 +01:00
parent 5ba66db7b4
commit 74d31f4fad

View file

@ -63,7 +63,8 @@ function useBaseScrape() {
const lastIdTmp = lastId.current; const lastIdTmp = lastId.current;
setSources((s) => { setSources((s) => {
if (s[id]) s[id].status = "pending"; if (s[id]) s[id].status = "pending";
if (lastIdTmp && s[lastIdTmp]) s[lastIdTmp].status = "success"; if (lastIdTmp && s[lastIdTmp] && s[lastIdTmp].status === "pending")
s[lastIdTmp].status = "success";
return { ...s }; return { ...s };
}); });
setCurrentSource(id); setCurrentSource(id);