From aaa9286221f18496676fefa15118951f8f0eb06d Mon Sep 17 00:00:00 2001 From: Alexandr Dascal Date: Wed, 13 Dec 2017 17:47:50 +0200 Subject: [PATCH] remove isChunk check --- index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/index.js b/index.js index 713a8ed6..80cd07c9 100644 --- a/index.js +++ b/index.js @@ -354,17 +354,7 @@ function getPath(compilation, source, chunk) { } } -function isChunk(chunk, error) { - if (!(chunk instanceof Chunk)) { - throw new Error(typeof error === 'string' ? error : 'chunk is not an instance of Chunk'); - } - - return true; -} - function forEachChunkModule(chunk, cb) { - isChunk(chunk); - // webpack >= 3.x.x if (typeof chunk.forEachModule === 'function') { chunk.forEachModule(cb); @@ -379,8 +369,6 @@ function forEachChunkModule(chunk, cb) { } function getChunkModulesArray(chunk) { - isChunk(chunk); - var arr = []; // webpack >= 3.x.x