JC Brand 2 vuotta sitten
vanhempi
commit
6c44fb2a2f
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  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 () {