We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c417f18 commit f77b68bCopy full SHA for f77b68b
lib/loader.js
@@ -184,7 +184,7 @@ module.exports = function (content) {
184
'hotAPI.createRecord(id, module.exports)\n' +
185
'module.hot.accept(' + JSON.stringify(accepted) + ', function () {\n' +
186
'var newOptions = ' + (scriptString ? 'require(' + scriptString + ')\n' : 'null\n') +
187
- 'if (newOptions.__esModule) newOptions = newOptions.default\n' +
+ 'if (newOptions && newOptions.__esModule) newOptions = newOptions.default\n' +
188
'var newTemplate = ' + (templateString ? 'require(' + templateString + ')\n' : 'null\n') +
189
'hotAPI.update(id, newOptions, newTemplate)\n' +
190
'})\n' +
0 commit comments