 selectedChannelThreadMessages = [
   selectedChannelThread
   (thread) ->
-    if thread?.has 'messages'
-    then thread.get 'messages'
-    else immutable.List()
+    return null  unless thread
+    thread.get 'messages'
+]
+
 selectedChannelPopularMessages = [
   channelPopularMessages
   selectedChannelThreadId

  MessagesStore
  (threads, messages) ->
    threads.map (thread) ->
      # replace messageIds in list with message instances.

      messages = thread.get('messages').map (messageId) ->

        message = messages.get messageId
        if message.has('__editedBody')
          message = message.set 'body', message.get '__editedBody'
          message = message.set 'payload', message.get '__editedPayload'

        return message

      thread.set 'messages', messages
]

channelPopularMessages = [

  channelThreads
  selectedChannel
  (threads, channel) ->
    return null  unless channel
    thread = threads.get channel.get('id')
    return thread.set 'channel', channel
]
