This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit c27062caa37b7b9c1e947d062aec53bd091ec535 Author: Daniel Gruno <[email protected]> AuthorDate: Sat Nov 13 17:30:49 2021 +0100 guard against no searchparams present --- webui/js/ponymail.js | 2 +- webui/js/source/listview-header.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js index 75cde7d..f4c68e0 100644 --- a/webui/js/ponymail.js +++ b/webui/js/ponymail.js @@ -2178,7 +2178,7 @@ function listview_header(state, json) { list_title += ", past month"; } - if (json.searchParams.q && json.searchParams.q.length || (json.searchParams.d || "").match(/=/)) { + if (json.searchParams && json.searchParams.q && json.searchParams.q.length || (json.searchParams.d || "").match(/=/)) { list_title = "Custom search"; } document.title = list_title + " - " + prefs.title; diff --git a/webui/js/source/listview-header.js b/webui/js/source/listview-header.js index 53211e3..60861ec 100644 --- a/webui/js/source/listview-header.js +++ b/webui/js/source/listview-header.js @@ -35,7 +35,7 @@ function listview_header(state, json) { list_title += ", past month"; } - if (json.searchParams.q && json.searchParams.q.length || (json.searchParams.d || "").match(/=/)) { + if (json.searchParams && json.searchParams.q && json.searchParams.q.length || (json.searchParams.d || "").match(/=/)) { list_title = "Custom search"; } document.title = list_title + " - " + prefs.title;
