浏览代码

WebAdmin events page: fix rendering of some nullable strings

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino 1 年之前
父节点
当前提交
ba3e2ecb5f
共有 1 个文件被更改,包括 18 次插入0 次删除
  1. 18 0
      templates/webadmin/events.html

+ 18 - 0
templates/webadmin/events.html

@@ -537,6 +537,9 @@ explicit grant from the SFTPGo Team ([email protected]).
                         defaultContent: "",
                         render: function(data, type, row) {
                             if (type === 'display') {
+                                if (!data){
+                                    return "";
+                                }
                                 return escapeHTML(data);
                             }
                             return data;
@@ -546,6 +549,9 @@ explicit grant from the SFTPGo Team ([email protected]).
                         data: "protocol",
                         defaultContent: "",
                         render: function(data, type, row) {
+                            if (!data){
+                                    return "";
+                                }
                             if (type === 'display') {
                                 return escapeHTML(data);
                             }
@@ -557,6 +563,9 @@ explicit grant from the SFTPGo Team ([email protected]).
                         defaultContent: "",
                         render: function(data, type, row) {
                             if (type === 'display') {
+                                if (!data){
+                                    return "";
+                                }
                                 return escapeHTML(data);
                             }
                             return data;
@@ -763,6 +772,9 @@ explicit grant from the SFTPGo Team ([email protected]).
                         defaultContent: "",
                         render: function(data, type, row) {
                             if (type === 'display') {
+                                if (!data){
+                                    return "";
+                                }
                                 return escapeHTML(data);
                             }
                             return data;
@@ -773,6 +785,9 @@ explicit grant from the SFTPGo Team ([email protected]).
                         defaultContent: "",
                         render: function(data, type, row) {
                             if (type === 'display') {
+                                if (!data){
+                                    return "";
+                                }
                                 return escapeHTML(data);
                             }
                             return data;
@@ -919,6 +934,9 @@ explicit grant from the SFTPGo Team ([email protected]).
                         defaultContent: "",
                         render: function(data, type, row) {
                             if (type === 'display') {
+                                if (!data){
+                                    return "";
+                                }
                                 if (data){
                                     return escapeHTML(data);
                                 }