You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/11/13 16:33:37 UTC
[incubator-ponymail-foal] branch master updated (ead725c -> 157c8a5)
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from ead725c Set window title to page title.
new c27062c guard against no searchparams present
new 157c8a5 lint and more guarding
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
webui/js/ponymail.js | 8 ++++++--
webui/js/source/listview-header.js | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
[incubator-ponymail-foal] 01/02: guard against no searchparams present
Posted by hu...@apache.org.
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 <hu...@apache.org>
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;
[incubator-ponymail-foal] 02/02: lint and more guarding
Posted by hu...@apache.org.
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 157c8a5728c4ad8fdd542fe2a767b7d17c6d47e1
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Nov 13 17:33:27 2021 +0100
lint and more guarding
---
webui/js/ponymail.js | 8 ++++++--
webui/js/source/listview-header.js | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index f4c68e0..5fabacc 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -2169,7 +2169,7 @@ function listview_header(state, json) {
if (current_list == 'virtual' && current_domain == 'inbox') {
list_title = "Virtual inbox, past 30 days";
}
- let blobs = json.emails;
+ let blobs = json.emails || [];
if (current_listmode == 'threaded') blobs = json.thread_struct;
if (current_year && current_month) {
@@ -2178,7 +2178,11 @@ function listview_header(state, json) {
list_title += ", past month";
}
- if (json.searchParams && 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 60861ec..0b48263 100644
--- a/webui/js/source/listview-header.js
+++ b/webui/js/source/listview-header.js
@@ -26,7 +26,7 @@ function listview_header(state, json) {
if (current_list == 'virtual' && current_domain == 'inbox') {
list_title = "Virtual inbox, past 30 days";
}
- let blobs = json.emails;
+ let blobs = json.emails || [];
if (current_listmode == 'threaded') blobs = json.thread_struct;
if (current_year && current_month) {
@@ -35,7 +35,11 @@ function listview_header(state, json) {
list_title += ", past month";
}
- if (json.searchParams && 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;