Is this the same as:

```
theScrollArea = if channelId then $('#channels-'+channelId) else  $('.channels-pane')
theScrollArea.scrollTop(theScrollArea.prop('scrollHeight'))
```

If so, this is prob easier to read. (I havent actually tested the code)