medialab / aime-core

Core engine of the AIME project serving its harmonized database.
http://www.modesofexistence.org/
Other
14 stars 3 forks source link

Refreshing admin at /#/doc route with a doc selected crashes #180

Closed robindemourat closed 7 years ago

robindemourat commented 7 years ago

Reproduce

  1. Go to the admin -> docs -> select a doc

  2. Refresh page

Expected behavior

Should mount the components relative to the specific doc.

Actual behavior

Components relative to specific doc do not mount, and app freezes with message:

Uncaught TypeError: Cannot read property 'surname' of undefined
    at Preview.fromIdToAuthor (eval at <anonymous> (bundle.js:2695), <anonymous>:59:18)
    at Preview.eval (eval at <anonymous> (bundle.js:1153), <anonymous>:15:37)
    at Preview.render (eval at <anonymous> (bundle.js:2695), <anonymous>:82:16)
    at Preview.eval (eval at <anonymous> (bundle.js:1153), <anonymous>:15:37)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (eval at <anonymous> (bundle.js:1453), <anonymous>:587:34)
    at ReactCompositeComponentWrapper._renderValidatedComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:607:32)
    at ReactCompositeComponentWrapper.wrapper [as _renderValidatedComponent] (eval at <anonymous> (bundle.js:1285), <anonymous>:66:21)
    at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:220:30)
    at ReactCompositeComponentWrapper.wrapper [as mountComponent] (eval at <anonymous> (bundle.js:1285), <anonymous>:66:21)
    at Object.mountComponent (eval at <anonymous> (bundle.js:1375), <anonymous>:37:35)

Uncaught TypeError: Cannot read property 'doc' of undefined
    at Editor.componentWillReceiveProps (eval at <anonymous> (bundle.js:2515), <anonymous>:120:37)
    at ReactCompositeComponentWrapper.updateComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:458:14)
    at ReactCompositeComponentWrapper.wrapper [as updateComponent] (eval at <anonymous> (bundle.js:1285), <anonymous>:66:21)
    at ReactCompositeComponentWrapper.receiveComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:405:10)
    at Object.receiveComponent (eval at <anonymous> (bundle.js:1375), <anonymous>:87:22)
    at ReactCompositeComponentWrapper._updateRenderedComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:562:23)
    at ReactCompositeComponentWrapper._performComponentUpdate (eval at <anonymous> (bundle.js:1453), <anonymous>:544:10)
    at ReactCompositeComponentWrapper.updateComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:473:12)
    at ReactCompositeComponentWrapper.wrapper [as updateComponent] (eval at <anonymous> (bundle.js:1285), <anonymous>:66:21)
    at ReactCompositeComponentWrapper.receiveComponent (eval at <anonymous> (bundle.js:1453), <anonymous>:405:10)
    at Object.receiveComponent (eval at <anonymous> (bundle.js:1375), <anonymous>:87:22)
robindemourat commented 7 years ago

Other scenario to reproduce :

--> interface freezes on the loading screen

robindemourat commented 7 years ago

fixed by 74e1677d603ef94afa4c112672e5e1c65313cad5