From 3dc122db8402a17cc2ffe015552d116d66243f1b Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 7 Jan 2024 10:43:43 +0000 Subject: fix regression collapsing non conv item content --- view/js/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'view/js/main.js') diff --git a/view/js/main.js b/view/js/main.js index f7b341557..d488a402e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -848,13 +848,14 @@ function scrollToItem() { function collapseHeight() { $(".wall-item-content:not('.divmore_checked'), .directory-collapse:not('.divmore_checked')").each(function(i) { let orgHeight = $(this).outerHeight(true); - let id = $(this).attr('id').split('wall-item-content-').pop(); + let id = (($(this).attr('id')) ? $(this).attr('id').split('wall-item-content-').pop() : 0); + let b64mid = ((typeof bParam_mid !== 'undefined') ? bParam_mid : ''); - if (bParam_mid) { + if (b64mid) { // Display the selected mid in an open state let b64mids = $('#thread-wrapper-' + id).data('b64mids'); - if (b64mids.indexOf(bParam_mid) !== -1) {; + if (b64mids.length && b64mids.indexOf(b64mid) !== -1) {; expanded_items.push(id); } } -- cgit v1.2.3