Browse Source

Bugfix. Bind to right 'this'

JC Brand 4 months ago
parent
commit
9ef19515d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/headless/shared/connection/index.js

+ 1 - 1
src/headless/shared/connection/index.js

@@ -124,7 +124,7 @@ export class Connection extends Strophe.Connection {
             // If we don't have a connection URL, we show an input for the user
             // If we don't have a connection URL, we show an input for the user
             // to manually provide it.
             // to manually provide it.
             api.settings.set('show_connection_url_input', true);
             api.settings.set('show_connection_url_input', true);
-            (callback || this.onConnectStatusChanged)(
+            (callback || this.onConnectStatusChanged.bind(this))(
                 Strophe.Status.DISCONNECTED,
                 Strophe.Status.DISCONNECTED,
                 __('Could not automatically determine a connection URL')
                 __('Could not automatically determine a connection URL')
             );
             );