makedown icon indicating copy to clipboard operation
makedown copied to clipboard

VM142报错

Open shouldsee opened this issue 6 years ago • 0 comments

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
      }
...

shouldsee avatar May 01 '18 00:05 shouldsee