Only show message body when it exists.

Otherwise the script will return the message subject again rather
than show nothing at all.
This commit is contained in:
Mathias Meyer 2014-05-05 10:02:30 +02:00
parent 4fa2ade298
commit 35fc98edaf

View File

@ -21,5 +21,8 @@ require 'travis/model'
body: ( ->
message = @get('message')
message.substr(message.indexOf("\n") + 1).trim()
if message.indexOf("\n") > 0
message.substr(message.indexOf("\n") + 1).trim()
else
""
).property('message')