Skip to content

Commit

Permalink
fix(component): fix loadComponent (typo)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Oct 30, 2018
1 parent c61681d commit a410cb2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/component/src/loadComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ export default function loadComponents(loadableState) {
invariant(WEBPACK, '`loadComponents()` is only compatible with Webpack')

return Promise.all(
loadableState.map(chunk => __webpack_require__.e(chunk)).catch(error => {
// We can safely ignore "missing" type errors
// we just want the bundle to be loaded, not the module installed
if (error.message.match(/missing:/)) return
throw error
}),
loadableState.map(chunk =>
__webpack_require__.e(chunk).catch(error => {
// We can safely ignore "missing" type errors
// we just want the bundle to be loaded, not the module installed
if (error.message.match(/missing:/)) return
throw error
}),
),
).catch(error => {
warn('`loadComponents()` has failed')
warn(error)
Expand Down

0 comments on commit a410cb2

Please sign in to comment.