Permalink
Browse files

[minor] Respond to error in commands/apps.js

  • Loading branch information...
indexzero committed Aug 12, 2011
1 parent dddaf8b commit 4ba9401c98667774529e50ec37d2ff99fddd9904
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/jitsu/commands/apps.js
View
@@ -164,8 +164,14 @@ apps.create = function (target, callback) {
pkg.name = name || pkg.name;
jitsu.apps.list(function (err, apps) {
- var username = jitsu.config.get('username');
- var existing = apps.filter(function (a) {
+ if (err) {
+ return callback(err);
+ }
+
+ var username = jitsu.config.get('username'),
+ existing;
+
+ existing = apps.filter(function (a) {
return a.name === pkg.name && a.user === username;
});

0 comments on commit 4ba9401

Please sign in to comment.