You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The console throws an error because doc is a required prop of ViewDocument and the return statement setup causes ViewDocument to render before the new ID is truly returned. There is a subsequent render after the erroneous one that passing in the doc prop so the app still functions.
I am not enough of an expert to know if what I did is the correct fix, but here is it:
Error in console:
Warning: Failed prop type: The prop `doc` is marked as required in `ViewDocument`, but its value is `undefined`.
Problematic code found in imports/api/Documents/methods.js
Fixed. A simple doc: Documents.findOne(documentId) || {}, in the container did the trick. The {} is enough buffer to not trip the prop type error when transitioning to the ViewDocument page.
The console throws an error because
doc
is a required prop ofViewDocument
and thereturn
statement setup causesViewDocument
to render before the new ID is truly returned. There is a subsequent render after the erroneous one that passing in thedoc
prop so the app still functions.I am not enough of an expert to know if what I did is the correct fix, but here is it:
Error in console:
Problematic code found in imports/api/Documents/methods.js
Changing the return statement to this alleviated the issue:
The text was updated successfully, but these errors were encountered: