Permalink
Browse files

[fix] Small fix to `jitsu.setup()` to make it more succinct

  • Loading branch information...
1 parent f5121b9 commit 8a73e0383f5e377eb1cfa48fbabd801cf826fe0a @indexzero indexzero committed Apr 3, 2011
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/jitsu.js
View
@@ -106,14 +106,13 @@ jitsu.exec = function (command, callback) {
// the username/password combo for the authenticated user.
//
jitsu.setup = function (callback) {
- if (started) {
- return;
+ if (!started) {
+ jitsu.users = new jitsu.api.Users(jitsu.config.settings);
+ jitsu.apps = new jitsu.api.Apps(jitsu.config.settings);
+ jitsu.snapshots = new jitsu.api.Snapshots(jitsu.config.settings);
+ started = true;
}
- jitsu.users = new jitsu.api.Users(jitsu.config.settings);
- jitsu.apps = new jitsu.api.Apps(jitsu.config.settings);
- jitsu.snapshots = new jitsu.api.Snapshots(jitsu.config.settings);
- started = true;
callback();
};

0 comments on commit 8a73e03

Please sign in to comment.