Fix javascript error on click on Show all messages link

When no messages are available.

Change-Id: I8564a515dfd20e29aa9dc491bcfc608ef6ed8756
Merge "Fix javascript error on click on Show all messages link"