edx-solutions/xblock-discussion — pull request #29 by antoviaque (2014-09-30 15:31:39+00:00)
Title: thread-loading: Workaround to avoid client crash when thread isn't found

Upon loading a thread directly via URL, if the thread isn't part of the threads currently loaded on the first page, it would crash:

```
TypeError: this.thread is undefined
```

Which is due to the fact that the thread object is not available from the current list of threads loaded on the client, and the client doesn't go to the server to get it.

The current workaround allows the client to load anyway when this happens, without showing the requested thread.

TODO: Load the thread from the server when it's not available locally.

CC @mtyaka @chrisndodge