mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-06-15 18:08:15 +08:00
Make it so clicking Close unmounts the error component
This commit is contained in:
3
packages/react-dev-utils/failFast.js
vendored
3
packages/react-dev-utils/failFast.js
vendored
@@ -179,6 +179,9 @@ function sourceCodePre(sourceLines, lineNum, columnNum, main = false) {
|
||||
function hintsDiv() {
|
||||
const hints = document.createElement('div')
|
||||
hints.appendChild(document.createTextNode('[escape] Close'))
|
||||
hints.addEventListener('click', e => {
|
||||
unmount()
|
||||
})
|
||||
applyStyles(hints, hintsStyle)
|
||||
return hints
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user