Skip to content

Commit

Permalink
Merge pull request #67 from oupirum/support_multiple_webpack_instances
Browse files Browse the repository at this point in the history
Fix for 'chunk is not an instance of Chunk'
  • Loading branch information
faceyspacey authored Apr 23, 2018
2 parents 6d68cef + afe1817 commit cdff169
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,14 @@ function getPath(compilation, source, chunk) {
}

function isChunk(chunk, error) {
if (!(chunk instanceof Chunk)) {
if (
!chunk ||
(
!chunk.modulesIterable &&
!chunk.forEachModule &&
!chunk.modules
)
) {
throw new Error(typeof error === 'string' ? error : 'chunk is not an instance of Chunk');
}

Expand Down

0 comments on commit cdff169

Please sign in to comment.