Open svaraborut opened 3 years ago
Thanks for reporting this and sending the PR. I've just merged it and will publish a new version soon
if (this.props.smiles !== prevProps.smiles) {
9384 this.jsmeApplet.readGenericMolecularInput(this.props.smiles); This error occurs when refreshing the page
When the component is loaded with a smile variable that is asynchronously set:
<Jsme height='800px' width='100%' smiles={smile_draft} ></Jsme>
A race condition between
componentDidUpdate
andhandleJsmeLoad
occurs:Usually Jsme is loaded after update. The if check does not work as
this.jsmeApplet === undefined
and notthis.jsmeApplet === null
Fixed in my pull request.