title: Unable to join chat channel
body: <p>When trying to join a channel in the twilio code I've been working with, it comes up with the error saying that it "Cannot read property 'getChannelByUniqueName' of null". The chat works but when I try to open it up on a different browser, like firefox instead of chrome, it says the error "Channel with provided unique name already exist".  Can anyone help with this problem?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    // Initialize the Chat client
      chatClient = new Twilio.Chat.Client(data.token);
      joinChannels(chatClient);
    });
  
    function joinChannels(chatClient) {
      chatClient.getSubscribedChannels();
      joinChannel('generalss','Generals Chat Channel');
    }
  
    function joinChannel(channelName, channelFriendlyName) {
      console.log(channelName);
      console.log(chatClient);
      print('Attempting to join "' + channelName + '" chat channel...');
      var promise = chatClient.getChannelByUniqueName(channelName);
      promise.then(function(channel) {
        console.log('Found ' + channelName + ' channel:');
        channels[channelName] = channel;
        console.log(channels);
        setupChannel();
      }).catch(function() {
        // If it doesn't exist, let's create it
        chatClient.createChannel({
          uniqueName: channelName,
          friendlyName: channelFriendlyName
        }).then(function(channel) {
          channels[channelName] = channel;
          setupChannel(channelName);
        });
      });
    }</code></pre>
  </div>
  </div>
  </p>