diff --git a/app/lib/bundler.js b/app/lib/bundler.js index d4870c527a..1a3e155af7 100644 --- a/app/lib/bundler.js +++ b/app/lib/bundler.js @@ -330,7 +330,7 @@ _.extend(Bundle.prototype, { else canon_where = _.clone(canon_where); canon_where.sort(); - var canon_where = JSON.stringify(canon_where); + canon_where = JSON.stringify(canon_where); if (inst.where[canon_where]) return; // already used in this environment diff --git a/packages/startup/package.js b/packages/startup/package.js index f5017e0323..8e9c54a307 100644 --- a/packages/startup/package.js +++ b/packages/startup/package.js @@ -3,17 +3,7 @@ Package.describe({ internal: true }); -// XXX hack -- need a way to use a package at bundle time -var _ = require('../../packages/underscore/underscore.js'); - -Package.on_use(function (api, where) { - where = where || ['client', 'server']; - if (!(where instanceof Array)) - where = [where]; - - if (_.indexOf(where, 'client') !== -1) - api.add_files('startup_client.js', 'client'); - - if (_.indexOf(where, 'server') !== -1) - api.add_files('startup_server.js', 'server'); +Package.on_use(function (api) { + api.add_files('startup_client.js', 'client'); + api.add_files('startup_server.js', 'server'); });