Skip to content

A platform for community discussion. Free, open, simple.

FIX: Don't attempt to delete non-existent bookmark (#12473)

Jarek Radosz3e586ab25a8c
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;