Skip to content
Browse files

Merge assets from iconfig.assets to meta

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...
1 parent 86ce91d commit d38432139b746002ab5cef22103711129f560662 @diervo diervo committed Oct 3, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/app/addons/ac/output-adapter.common.js
View
2 lib/app/addons/ac/output-adapter.common.js
@@ -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,
@@ -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) {

0 comments on commit d384321

Please sign in to comment.
Something went wrong with that request. Please try again.