Fix Device table not loading

This commit is contained in:
Jokob-sk
2023-01-23 00:03:34 +11:00
parent a33c50361f
commit 7baae289d1
5 changed files with 27 additions and 22 deletions

View File

@@ -292,12 +292,16 @@ function settingsChanged()
// -----------------------------------------------------------------------------
function translateHTMLcodes (text) {
if (text == null) {
if (text == null || emptyArr.includes(text)) {
return null;
} else if (typeof text === 'string' || text instanceof String)
{
var text2 = text.replace(new RegExp(' ', 'g'), "&nbsp");
text2 = text2.replace(new RegExp('<', 'g'), "&lt");
return text2;
}
var text2 = text.replace(new RegExp(' ', 'g'), "&nbsp");
text2 = text2.replace(new RegExp('<', 'g'), "&lt");
return text2;
return "";
}