linking system really fixed
parent
3ada730069
commit
f02f2968c7
|
@ -390,29 +390,35 @@ GameLib.System.Linking.prototype.resolveDependencies = function(component) {
|
||||||
|
|
||||||
this.resolved = [];
|
this.resolved = [];
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
//else {
|
||||||
|
|
||||||
var keys = Object.keys(this.dependencies);
|
// var keys = Object.keys(this.dependencies);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* And this is it - we need to check if the dependencies array contains any 'resolved' components -
|
* And this is it - we need to check if the dependencies array contains any 'resolved' components -
|
||||||
* If it does - resolve the dependencies of this newly 'resolved' component
|
* If it does - resolve the dependencies of this newly 'resolved' component
|
||||||
*/
|
*/
|
||||||
this.resolved.map(
|
// this.resolved = this.resolved.reduce(
|
||||||
|
//
|
||||||
function(component) {
|
// function(result, component) {
|
||||||
|
//
|
||||||
if (keys.indexOf(component.id) !== -1) {
|
// if (keys.indexOf(component.id) !== -1) {
|
||||||
/**
|
// /**
|
||||||
* We found a resolved component - which is a dependency for another component.
|
// * We found a resolved component - which is a dependency for another component.
|
||||||
* Resolve the dependencies of this component - this is recursive and should be done carefully
|
// * Resolve the dependencies of this component - this is recursive and should be done carefully
|
||||||
*/
|
// */
|
||||||
this.resolveDependencies(component);
|
// this.resolveDependencies(component);
|
||||||
}
|
// } else {
|
||||||
|
// result.push(component);
|
||||||
}.bind(this)
|
// }
|
||||||
);
|
//
|
||||||
}
|
// return result;
|
||||||
|
//
|
||||||
|
// }.bind(this),
|
||||||
|
// []
|
||||||
|
// );
|
||||||
|
//}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue