Fix JavaScript error while filtering messages

Bug: 47034
Change-Id: I6d18c0d330e29a59953fc144e403d59222574cac
Merge "Fix JavaScript error while filtering messages"