Skip to content

Commit

Permalink
[fix] indexOf is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro committed Apr 8, 2012
1 parent e4a50a4 commit b3e52cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/app.js
Expand Up @@ -39,7 +39,10 @@ module.exports = {
}
var l = 'info',
r = data.running;
if (data.running == false || data.running.indexOf('error') > -1 || data.running.indexOf('failed-to-stop') > -1) {
var state = false
if (data[i].running.hasOwnProperty('indexOf') && (data[i].running.indexOf('error') >-1|| data[i].running.indexOf('failed-to') > -1))
var state = true;
if (data.running == false || state) {
l = 'warn';
if (r === false) {
r = 'false'
Expand Down

0 comments on commit b3e52cc

Please sign in to comment.