1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Make sure module.context exist always (#2580)

Fixes #2578
This commit is contained in:
Arunoda Susiripala 2017-07-17 11:11:37 +05:30 committed by GitHub
parent 1a02b0efa4
commit af7b875a18

View file

@ -106,7 +106,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false,
// We need to move react-dom explicitly into common chunks.
// Otherwise, if some other page or module uses it, it might
// included in that bundle too.
if (module.context.indexOf(`${sep}react-dom${sep}`) >= 0) {
if (module.context && module.context.indexOf(`${sep}react-dom${sep}`) >= 0) {
return true
}