Correctly show failed events

JavaScript considers an empty array to be truthy, which resulted
in an empty list of failed events being displayed even when no
failed events occurred. We need to test for array length instead.

Change-Id: Ibf0bea107bd9fa9ad94aa4498e56643aeace798f
Merge "Correctly show failed events"