Skip to content

Commit 40e3ff2

Browse files
committed
fix: error overlay is not server side friendly, #1126
1 parent 65d70a8 commit 40e3ff2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: examples/all-possible-containers/src/components/SomethingWithHooks.js

Whitespace-only changes.

Diff for: src/errorReporter.js

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ class ErrorOverlay extends React.Component {
105105
}
106106

107107
const initErrorOverlay = () => {
108+
if (!document) {
109+
return
110+
}
108111
let div = document.querySelector('.react-hot-loader-error-overlay')
109112
if (!div) {
110113
div = document.createElement('div')

0 commit comments

Comments
 (0)