Skip to content

Commit

Permalink
perf(index): single array index for system key
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Oct 1, 2017
1 parent 3363afa commit f5e36b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Expand Up @@ -180,7 +180,8 @@ if (!PLATFORM.global.System || !PLATFORM.global.System.import) {
const keys = Array.from(System.registry.keys()); const keys = Array.from(System.registry.keys());
for (let i = 0; i < keys.length; i++) { for (let i = 0; i < keys.length; i++) {
try { try {
if (callback(keys[i], System.registry.get(keys[i]))) { return; } let key = keys[i];
if (callback(key, System.registry.get(key))) { return; }
} catch (e) {} } catch (e) {}
} }
return; return;
Expand Down

0 comments on commit f5e36b1

Please sign in to comment.