From 0a44aa5a37acdced7dbac10fdc7f69d16eb5316f Mon Sep 17 00:00:00 2001 From: Albert Jimenez Date: Mon, 14 Jul 2014 11:35:40 -0700 Subject: [PATCH] Removed unused code. Making sure that _staticDetails exists, this may be the case when using lazyMojits/lazyLangs and executing a mojit without going through the mojito-handler-static middleware (for example through some testing framework like mojito-markup-test) --- lib/app/autoload/store.server.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/app/autoload/store.server.js b/lib/app/autoload/store.server.js index 878821fe3..209da03aa 100644 --- a/lib/app/autoload/store.server.js +++ b/lib/app/autoload/store.server.js @@ -259,10 +259,6 @@ YUI.add('mojito-resource-store', function(Y, NAME) { this.lazyLangs = this._appConfigStatic.resourceStore && this._appConfigStatic.resourceStore.lazyLangs; this.lazyMojits = this._appConfigStatic.resourceStore && this._appConfigStatic.resourceStore.lazyMojits; - if (this.lazyMojits && typeof this.lazyMojits !== 'object') { - this.lazyMojits = {}; - } - this.fire('loadConfigs'); }, @@ -2182,7 +2178,9 @@ YUI.add('mojito-resource-store', function(Y, NAME) { this.yui._processResources(ress); // Add new static details. - this.getURLDetails(ress, this._staticDetails); + if (this._staticDetails) { + this.getURLDetails(ress, this._staticDetails); + } },