Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix 123. Ensure we pass through createContext to nested scopes. Fix h…
…andling of mixin in wirePlugin
  • Loading branch information
briancavalier committed Jul 16, 2013
1 parent b9822c7 commit 88d35e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/plugin/wirePlugin.js
Expand Up @@ -72,6 +72,12 @@ define(function(require) {
return initialized;
}

/**
* Create a child context of the current context
* @param {object?} mixin additional spec to be mixed into
* the child being wired
* @returns {Promise} promise for child context
*/
function createChild(/** {Object|String}? */ mixin) {
var spec, config;

Expand Down Expand Up @@ -100,7 +106,7 @@ define(function(require) {
result = wrapChild(childPromise);

} else {
result = createChild(componentDef.spec);
result = createChild();
}

resolver.resolve(result);
Expand Down
3 changes: 2 additions & 1 deletion lib/scope.js
Expand Up @@ -81,8 +81,9 @@ define(function(require) {
},

_createNestedScope: function(spec) {
var options = { createContext: this.createContext };
return this._addDependent(
new Scope(this).init(spec), this.postDestroy);
new Scope(this, options).init(spec), this.postDestroy);
},

_createChildContext: function(spec, options) {
Expand Down

0 comments on commit 88d35e8

Please sign in to comment.