From d7d2a151a8d60a8bde87a8245da299cd6489552f Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Tue, 24 Jan 2023 22:19:24 +0100 Subject: [PATCH] client: workaround for #545, but not a fix --- client/js/controllers/post_list_controller.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/client/js/controllers/post_list_controller.js b/client/js/controllers/post_list_controller.js index ec3e13c3..fdb7b844 100644 --- a/client/js/controllers/post_list_controller.js +++ b/client/js/controllers/post_list_controller.js @@ -53,12 +53,14 @@ class PostListController { this._evtNavigate(e) ); - this._headerView._bulkDeleteEditor.addEventListener( - "deleteSelectedPosts", - (e) => { - this._evtDeleteSelectedPosts(e); - } - ); + if (this._headerView._bulkDeleteEditor) { + this._headerView._bulkDeleteEditor.addEventListener( + "deleteSelectedPosts", + (e) => { + this._evtDeleteSelectedPosts(e); + } + ); + } this._postsMarkedForDeletion = []; this._syncPageController();