From 2b40b5641ba28187a8c2e9162391e9443e6e7a22 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 19 Jan 2023 15:30:11 +0100 Subject: [eventlog] Sort dropdown, fix sample data display --- modules-available/eventlog/templates/page-filters-edit-rule.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules-available/eventlog/templates') diff --git a/modules-available/eventlog/templates/page-filters-edit-rule.html b/modules-available/eventlog/templates/page-filters-edit-rule.html index a7886397..7016e156 100644 --- a/modules-available/eventlog/templates/page-filters-edit-rule.html +++ b/modules-available/eventlog/templates/page-filters-edit-rule.html @@ -172,8 +172,10 @@ var chFn = function () { var $this = $(this); var wat = currentType[$this.val()]; - if (wat) { - wat = wat.replace("\r", "\\r").replace("\n", "\\n"); + if (typeof(wat) !== 'undefined') { + if (typeof(wat) === 'string') { + wat = wat.replace("\r", "\\r").replace("\n", "\\n"); + } if (wat.length > 180) { wat = wat.substr(0, 180) + '...'; } -- cgit v1.2.3-55-g7522