diff options
author | Mario <mario@mariovavti.com> | 2024-01-07 10:43:43 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-01-07 10:43:43 +0000 |
commit | 3dc122db8402a17cc2ffe015552d116d66243f1b (patch) | |
tree | 32b76ffa2ad1703f1d5531d5a0fd916e40212e41 | |
parent | 99c5a4e2f8660fad1812849df47a8a3a3377d9a9 (diff) | |
download | volse-hubzilla-3dc122db8402a17cc2ffe015552d116d66243f1b.tar.gz volse-hubzilla-3dc122db8402a17cc2ffe015552d116d66243f1b.tar.bz2 volse-hubzilla-3dc122db8402a17cc2ffe015552d116d66243f1b.zip |
fix regression collapsing non conv item content
-rw-r--r-- | view/js/main.js | 7 |
1 files changed, 4 insertions, 3 deletions
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); } } |