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 93de1a2443d72d8bf4394021411c5559a86ad221 Author: Daniel Gruno <[email protected]> AuthorDate: Fri Dec 10 20:31:42 2021 +0100 fix shadowing --- webui/js/source/listview-threaded.js | 1 + webui/js/source/listview-treeview.js | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/webui/js/source/listview-threaded.js b/webui/js/source/listview-threaded.js index f33a122..1f9ad79 100644 --- a/webui/js/source/listview-threaded.js +++ b/webui/js/source/listview-threaded.js @@ -49,6 +49,7 @@ function listview_threaded(json, start) { function find_email(id) { let json = G_current_json; + if (!json.emails) return null; for (let email of json.emails) { if (email.id == id) return email; } diff --git a/webui/js/source/listview-treeview.js b/webui/js/source/listview-treeview.js index 8305104..bcdde8c 100644 --- a/webui/js/source/listview-treeview.js +++ b/webui/js/source/listview-treeview.js @@ -15,13 +15,6 @@ limitations under the License. */ -function find_email(json, id) { - if (!json) return - for (let eml of json.emails || []) { - if (id === eml.id) return eml - } -} - function listview_treeview(json, start) { let list = document.getElementById('emails'); list.innerHTML = "";
