Skip to content

Commit

Permalink
addon config can be object or array
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Balibrera committed Sep 4, 2013
1 parent d1b2089 commit 1565c22
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/build/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,12 @@ function createCompiler (project, opts) {

exports.getAddonsForApp = function (project) {
var addonConfig = project.getAddonConfig();
if (!Array.isArray(addonConfig)) {
addonConfig = Object.keys(addonConfig);
}
var addons = addonManager.getAddons();
var result = {};
Object.keys(addonConfig).forEach(function (addonName) {
addonConfig.forEach(function (addonName) {
if (!addons[addonName]) {
logger.error('required addon', addonName, 'not found');
} else {
Expand Down

0 comments on commit 1565c22

Please sign in to comment.