Permalink
Browse files

fix(index): use .keys instead of .entries close #43

  • Loading branch information...
StrahilKazlachev committed Sep 15, 2017
1 parent 31f848d commit 49948a16cbea9e2886b169215f1eeeaec03381ee
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/index.js
View
@@ -177,9 +177,10 @@ if (!PLATFORM.global.System || !PLATFORM.global.System.import) {
} else {
PLATFORM.eachModule = function(callback) {
if (System.registry) { // SystemJS >= 0.20.x
for (let [k, m] of System.registry.entries()) {
const keys = Array.from(System.registry.keys());
for (let i = 0; i < keys.length; i++) {
try {
if (callback(k, m)) return;
if (callback(keys[i], System.registry.get(keys[i]))) { return; }
} catch (e) {}
}
return;

0 comments on commit 49948a1

Please sign in to comment.