makedown
makedown copied to clipboard
VM142报错
VM142:9 Uncaught TypeError: Cannot read property '_owner' of undefined
at findReactComponent (<anonymous>:9:46)
at makedown.register (<anonymous>:27:24)
at Object.dispatch (<anonymous>:6:20)
at window.addEventListener (<anonymous>:26:21)
(function () {
/**
* Get state from React by pretending to be React Developer Tools
*/
function findReactComponent (elem) {
for (let key in elem) {
if (key.startsWith('__reactInternalInstance$')) {
return elem[key]._currentElement._owner._instance #### !!Error !!
}
}
return null
}
...