Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge assets from iconfig.assets to meta
Browse files Browse the repository at this point in the history
In mojito 0.4.x due to the automatic inclusion of the mojito-assets-addon, when executing the loop on line 124 it calls the metaMergeInto of the assets addon which makes the config to merge.
Since we dont have that automatic, we will need to do it by default.
If you add the assets addon as a dependencie, due to the implementation of metaMerge will not duplicate assets. So is just a small overhead on computation in that case. 
This is a must merge to Shaker.
  • Loading branch information
diervo committed Oct 4, 2012
1 parent 86ce91d commit d384321
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/app/addons/ac/output-adapter.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ YUI.add('mojito-output-adapter-addon', function(Y, NAME) {
// NOTE: 'this' is the ActionContext instance
var callbackFunc = more ? 'flush' : 'done',
instance = this.command.instance,
config = instance.config || {},
context = this.command.context || {},
adapter = this._adapter,
action = this.command.action,
Expand Down Expand Up @@ -119,6 +120,7 @@ YUI.add('mojito-output-adapter-addon', function(Y, NAME) {
mojitView.engine = meta.view.engine;
}

meta.assets = Y.mojito.util.metaMerge(meta.assets, config.assets || {} );
// Here we ask each "thing" attached to the AC if it wants to add view
// "meta"
Y.Object.each(this, function(item) {
Expand Down

0 comments on commit d384321

Please sign in to comment.