From 3e586ab25a8c8af8ef54df9bad89e03ba3e2ddee Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 22 Mar 2021 18:25:34 +0100 Subject: [PATCH] FIX: Don't attempt to delete non-existent bookmark (#12473) Could happen when using the keyboard shortcut. ("d d") --- app/assets/javascripts/discourse/app/components/bookmark.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/bookmark.js b/app/assets/javascripts/discourse/app/components/bookmark.js index 4ac3649f211..7d05dd780dc 100644 --- a/app/assets/javascripts/discourse/app/components/bookmark.js +++ b/app/assets/javascripts/discourse/app/components/bookmark.js @@ -383,6 +383,10 @@ export default Component.extend({ @action delete() { + if (!this.model.id) { + return; + } + this._deleting = true; let deleteAction = () => { this._closeWithoutSaving = true;