Normalizing text before assigning it to a DOM element

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
pull/4709/head
IgorA100 2026-03-14 15:45:01 +03:00 committed by GitHub
parent 040f461b86
commit d43dd30155
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -662,8 +662,9 @@ function MonitorStream(monitorData) {
const infoBlock = document.getElementById('stream-info-block' + this.id) || this.createInfoBlock();
if (infoBlock) {
if (params.color) infoBlock.style.color = params.color;
infoBlock.textContent = text;
if (text === null || text === "") {
const normalizedText = (text == null) ? '' : text;
infoBlock.textContent = normalizedText;
if (normalizedText === "") {
infoBlock.style.zIndex = 0;
this.hideImgForInfoBlock();
} else {