Skip to content

Commit

Permalink
fix: handle case when dep.request is undefined (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmmmwh authored Jun 27, 2021
1 parent 86c9a77 commit c7d7410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class ReactRefreshPlugin {
// Exhaustively search all entries for `integrationEntry`.
// If found, mark those entries and the index of `integrationEntry`.
for (const [name, entryData] of compilation.entries.entries()) {
const index = entryData.dependencies.findIndex((dep) =>
dep.request.includes(integrationEntry)
const index = entryData.dependencies.findIndex(
(dep) => dep.request && dep.request.includes(integrationEntry)
);
if (index !== -1) {
socketEntryData.push({ name, index });
Expand Down

0 comments on commit c7d7410

Please sign in to comment.