diff --git a/src/headless/converse-roster.js b/src/headless/converse-roster.js index ba6f081de..ae4c5987e 100644 --- a/src/headless/converse-roster.js +++ b/src/headless/converse-roster.js @@ -917,7 +917,7 @@ converse.plugins.add('converse-roster', { }); }); - _converse.api.listen.on('beforeTearDown', _converse.unregisterPresenceHandler()); + _converse.api.listen.on('beforeTearDown', () => _converse.unregisterPresenceHandler()); _converse.api.waitUntil('rosterContactsFetched').then(() => { _converse.roster.on('add', (contact) => {