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
parent
040f461b86
commit
d43dd30155
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue