mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 19:35:28 +00:00
Fix duplicate card variable in health badge update
This commit is contained in:
1 parent
866e4f11fb
commit
0b4523b0be
1 file changed
+6
-6
+6
-6
@@ -441,13 +441,13 @@ function setBadge(card, state, details) {
|
||||
delete badge.dataset.streamHealthPeers;
|
||||
}
|
||||
|
||||
const card = badge.closest(".video-card");
|
||||
if (card) {
|
||||
card.dataset.streamHealthState = state;
|
||||
const cardEl = badge.closest(".video-card");
|
||||
if (cardEl) {
|
||||
cardEl.dataset.streamHealthState = state;
|
||||
if (hasPeerCount) {
|
||||
card.dataset.streamHealthPeers = peersTextValue;
|
||||
} else if (card.dataset.streamHealthPeers) {
|
||||
delete card.dataset.streamHealthPeers;
|
||||
cardEl.dataset.streamHealthPeers = peersTextValue;
|
||||
} else if (cardEl.dataset.streamHealthPeers) {
|
||||
delete cardEl.dataset.streamHealthPeers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user