Fix for error messages that aren't lists

This commit is contained in:
ebolam
2022-10-04 15:41:41 -04:00
parent bc49577974
commit 68969b72c5

View File

@@ -2125,10 +2125,14 @@ function show_error_message(data) {
while (error_box_data.firstChild) { while (error_box_data.firstChild) {
error_box_data.removeChild(error_box_data.firstChild); error_box_data.removeChild(error_box_data.firstChild);
} }
if (Array.isArray(data)) {
for (item of data) { for (item of data) {
$e("div", error_box_data, {'innerHTML': item, 'classes': ['console_text']}) $e("div", error_box_data, {'innerHTML': item, 'classes': ['console_text']})
$e("br", error_box_data) $e("br", error_box_data)
} }
} else {
$e("div", error_box_data, {'innerHTML': item, 'classes': ['console_text']})
}
} }
function do_wpp(wpp_area) { function do_wpp(wpp_area) {