Browse files

expandInstance fix to avoid the param copy

  • Loading branch information...
1 parent 8ce3829 commit 0663799b0bff8adc755e4058fe978230bae77fad @diervo committed Oct 9, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 lib/app/addons/ac/composite.common.js
View
13 lib/app/addons/ac/composite.common.js
@@ -312,16 +312,25 @@ callback({
child = children[childName];
// Create a buffer for the child
buffer[childName] = {name: childName, data: '', meta: {}};
-
// Make a new "command" that works in the context of this
// composite
newCommand = {
- instance: child,
+ instance: {
+ id: child.id,
+ action: child.action
+ },
// use action in child spec or default to index
action: child.action || 'index',
context: command.context,
params: child.params || command.params
};
+ if (child.base) {
+ newCommand.instance.base = child.base;
+ } else if (child.type) {
+ newCommand.instance.type = child.type;
+ } else {
+ throw new Error('No type or base founded');
+ }
childAdapter = new AdapterBuffer(buffer, childName,
callback);

0 comments on commit 0663799

Please sign in to comment.