From ad98cb42442b2b9c5f34534d833dbcf192d96608 Mon Sep 17 00:00:00 2001 From: cristo-rabani Date: Sat, 28 Nov 2015 21:42:41 +0100 Subject: [PATCH] update --- extensions/autoLoader.js | 6 ++++-- package.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/autoLoader.js b/extensions/autoLoader.js index 9203c1d..1e20c5c 100644 --- a/extensions/autoLoader.js +++ b/extensions/autoLoader.js @@ -22,14 +22,16 @@ System.autoLoad = (name, deps, fn) => { const exports = {}; const registerExport = (key, value) => { if (typeof key === 'object') { - Object(key).forEach((k) => exports[k] = key[k]); + Object.keys(key).forEach((k) => exports[k] = key[k]); return; } exports[key] = value; }; const declaration = fn(registerExport, exports); if (!declaration.setters || !declaration.execute) { - throw new TypeError('Invalid Module form for ' + name); + const msg = 'Invalid Module form for ' + name; + console.error(msg); + return Promise.reject(new Error(msg)); } declaration.setters.forEach((setFn, index) => { setFn(loadedModules[index]); diff --git a/package.js b/package.js index e9a0c9b..6a7749c 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'universe:modules', - version: '0.6.6', + version: '0.6.7', summary: 'Use ES6 / ES2015 modules in Meteor with SystemJS!', git: 'https://github.com/vazco/universe-modules', documentation: 'README.md'