| 609 | | 609 | |
| 610 | $(document).on('click', '.select_chat_block, .mes_bookmark', async function (e) { | 610 | $(document).on('click', '.select_chat_block, .mes_bookmark', async function (e) { |
| 611 | // If shift is held down, we are not following the bookmark, but creating a new one | 611 | // If shift is held down, we are not following the bookmark, but creating a new one |
| 612 | if (e.shiftKey) { | 612 | const mes = $(this).closest('.mes'); |
| 613 | const selectedMesId = $(this).closest('.mes').attr('mesid'); | 613 | if (e.shiftKey && mes.length) { |
| | 614 | const selectedMesId = mes.attr('mesid'); |
| 614 | await createNewBookmark(Number(selectedMesId)); | 615 | await createNewBookmark(Number(selectedMesId)); |
| 615 | return; | 616 | return; |
| 616 | } | 617 | } |