Rename format into returnObject w/ (true/false/undefined)

This commit is contained in:
Paul de Vries 2016-02-18 22:41:53 +00:00
parent f67da6507f
commit 0827ae10f2

View file

@ -204,7 +204,7 @@ $(function() {
}
// transform array into object if a plugin wants it as an object
constructorParameters = (viewModel.format === "object") ? _.object(viewModel.dependencies, constructorParameters) : constructorParameters;
constructorParameters = (viewModel.returnObject) ? _.object(viewModel.dependencies, constructorParameters) : constructorParameters;
// if we came this far then we could resolve all constructor parameters, so let's construct that view model
log.debug("Constructing", viewModel.name, "with parameters:", viewModel.dependencies);