JC Brand 2 年 前
コミット
6c44fb2a2f
1 ファイル変更5 行追加4 行削除
  1. 5 4
      src/plugins/bookmark-views/components/bookmark-form.js

+ 5 - 4
src/plugins/bookmark-views/components/bookmark-form.js

@@ -11,10 +11,11 @@ class MUCBookmarkForm extends CustomElement {
         }
     }
 
-    connectedCallback () {
-        super.connectedCallback();
-        this.model = _converse.chatboxes.get(this.jid);
-        this.bookmark  = _converse.bookmarks.get(this.model.get('jid'));
+    willUpdate (changed_properties) {
+        if (changed_properties.has('jid')) {
+            this.model = _converse.chatboxes.get(this.jid);
+            this.bookmark  = _converse.bookmarks.get(this.jid);
+        }
     }
 
     render () {