Permalink
Browse files

[api][logs] proper logic testing before regex test

  • Loading branch information...
blakmatrix committed Mar 14, 2013
1 parent 0f6ac8f commit 664ee4e5476010d92df4d03b8f8f204b7c16a4fe
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/jitsu/commands/logs.js
@@ -200,7 +200,7 @@ function putLogs (results, appName, amount, showApp) { //TODO: utilize amount an
}

results.data.sort(sort).forEach(function (datum) {
if (datum.json && datum.json.message != null && RegExp('^' + appName + '$').test(datum.json.app)) {
if (datum.json && datum.json.message !== null && datum.json.app !== null && RegExp('^' + appName + '$').test(datum.json.app)) {
// '[' + datum.json.app.magenta + ']
datum.json.message.split('\n').forEach(function (line) {
var now = new Date(datum.timestamp);

0 comments on commit 664ee4e

Please sign in to comment.