This commit is contained in:
William Mantly 2016-02-08 10:13:03 -05:00
parent d438cdd249
commit a1a0ec8d02

10
lxc.js
View File

@ -188,17 +188,17 @@ var lxcORM = function(){
var containers = {}
this.isReady = false;
this.whenReady = [];
var callthis = this;
var that = this
this.list(function(data){
for(var idx = data.length; idx--;){
containers[data[idx].name] = new Container(data[idx]);
if(idx===0){
callthis.callReady();
that.callReady;
}
}
});
this.containers = containers
this.containers = containers;
};
@ -207,7 +207,7 @@ lxcORM.prototype.callReady = function(){
this.whenReady[idx].apply(this);
}
this.isReady = true;
}
};
lxcORM.prototype.ready = function(callback){
if(this.isReady){
@ -216,7 +216,7 @@ lxcORM.prototype.ready = function(callback){
else{
this.whenReady.push(callback);
}
}
};
lxcORM.prototype.create = function(args, callback){