瀏覽代碼

Bugfix. Don't re-init bookmarks on reconnection

This causes an empty bookmarks list in the controlbox, because the
collection gets cleared (and then asynchronousy repopulated) while the
`bookmarksInitialized` promise stays `true` (resulting in a race
condition).

Alternative fix could be to clear the bookmarks and recreate the promise
before reconnecting but doesn't seem necessary to do all that work.
JC Brand 4 年之前
父節點
當前提交
7bd0d9a83f
共有 1 個文件被更改,包括 0 次插入2 次删除
  1. 0 2
      src/headless/plugins/bookmarks/index.js

+ 0 - 2
src/headless/plugins/bookmarks/index.js

@@ -108,8 +108,6 @@ converse.plugins.add('converse-bookmarks', {
             }
         });
 
-        api.listen.on('reconnected', initBookmarks);
-
         api.listen.on('connected', async () =>  {
             // Add a handler for bookmarks pushed from other connected clients
             const { connection } = _converse;