Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 8a73e0383f5e377eb1cfa48fbabd801cf826fe0a 1 parent f5121b9
@indexzero indexzero authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/jitsu.js
View
11 lib/jitsu.js
@@ -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();
};
Please sign in to comment.
Something went wrong with that request. Please try again.