Skip to content

Commit

Permalink
no array allocation during externals
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Dec 2, 2015
1 parent d3ae40b commit 5f8ff3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resolvers/webpack/index.js
Expand Up @@ -94,7 +94,11 @@ function findExternal(source, externals) {
}

// else, vanilla object
return Object.keys(externals).some(function (e) { return source === e })
for (var key in externals) {
if (!externals.hasOwnProperty(key)) continue
if (source === key) return true
}
return false
}

/**
Expand Down

0 comments on commit 5f8ff3e

Please sign in to comment.