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

Commit

Permalink
resource store honors yui.config during preload
Browse files Browse the repository at this point in the history
  • Loading branch information
drewfish committed May 16, 2013
1 parent 2ad2f2c commit 9fb3e07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/app/autoload/store.server.js
Expand Up @@ -1927,7 +1927,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
if (versions[res.id][priority].source.fs.fullPath !== res.source.fs.fullPath) {
Y.log('Resource version collision for ' + res.id +
'\nchoosing: ' + versions[res.id][priority].source.fs.fullPath +
'\nskipping: ' + res.source.fs.fullPath, 'warn', NAME);
'\nskipping: ' + res.source.fs.fullPath, 'info', NAME);
}
} else {
versions[res.id][priority] = res;
Expand Down
5 changes: 4 additions & 1 deletion lib/store.js
Expand Up @@ -41,6 +41,7 @@ Store.createStore = function(options) {

var store,
YUI,
appConfig,
Y;

if (!options) {
Expand All @@ -61,7 +62,6 @@ Store.createStore = function(options) {
// of the ResourceStore instance.
YUI = YUIFactory.getYUI();


// Configure the prerequisites and load the resource store impl code.
Y = YUI({
useSync: true,
Expand All @@ -85,6 +85,9 @@ Store.createStore = function(options) {
appConfig: options.appConfig
});

appConfig = store.getStaticAppConfig();
Y.applyConfig((appConfig && appConfig.yui && appConfig.yui.config) || {});

if ('initial' === options.preload) {
store.preloadInitial();
} else if ('skip' !== options.preload) {
Expand Down

0 comments on commit 9fb3e07

Please sign in to comment.