From 9884db3ce0014a8121567c3b4d7c3ff1d1918a98 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Thu, 12 Oct 2023 15:35:28 +0100 Subject: [PATCH] fix undefined memory label (#5422) --- views/default-mobile.handlebars | 2 +- views/default.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 1a39f620..61837bef 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -5996,7 +5996,7 @@ for (var i in hardware.windows.memory) { var m = hardware.windows.memory[i]; x += '
'; - x += '
' + EscapeHtml(m.BankLabel) + '
'; + x += '
' + EscapeHtml((m.BankLabel ? m.BankLabel : 'Unknown')) + '
'; if (m.Capacity && m.Speed) { x += addDetailItem("Capacity / Speed", format("{0} Mb, {1} Mhz", (m.Capacity / 1024 / 1024), m.Speed), s); } else if (m.Capacity) { x += addDetailItem("Capacity", format("{0} Mb", (m.Capacity / 1024 / 1024)), s); } if (m.PartNumber) { x += addDetailItem("Part Number", EscapeHtml((m.Manufacturer && m.Manufacturer != 'Undefined') ? (m.Manufacturer + ', ') : '') + EscapeHtml(m.PartNumber), s); } diff --git a/views/default.handlebars b/views/default.handlebars index dae77a81..3c9bc3b2 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -11699,7 +11699,7 @@ for (var i in hardware.windows.memory) { var m = hardware.windows.memory[i]; x += '
'; - x += '
' + EscapeHtml(m.BankLabel) + '
'; + x += '
' + EscapeHtml((m.BankLabel ? m.BankLabel : 'Unknown')) + '
'; if (m.Capacity && m.Speed) { x += addDetailItem("Capacity / Speed", format("{0} Mb, {1} Mhz", (m.Capacity / 1024 / 1024), m.Speed), s); } else if (m.Capacity) { x += addDetailItem("Capacity", format("{0} Mb", (m.Capacity / 1024 / 1024)), s); } if (m.PartNumber) { x += addDetailItem("Part Number", EscapeHtml((m.Manufacturer && m.Manufacturer != 'Undefined')?(m.Manufacturer + ', '):'') + EscapeHtml(m.PartNumber), s); }