Hi,
We’ve come across an error in our application that has been very difficult to reproduce consistently, but were wondering if you would have any ideas of the cause or pointers on what to look for.
TypeError: Cannot read properties of null (reading 'part')
push../node_modules/gojs/release/go-module.js.La.updateAdornments
http://localhost:3000/static/js/vendors~main.chunk.js:127102:23
127099 |
127100 | if (b instanceof te && this.Fp === a) {
127101 | var c = b.adornedObject;
> 127102 | (null !== a ? c.part === a : null === c) ? this.showToolTip(b, c) : this.hideToolTip();
| ^
127103 | }
127104 | };
127105 |
This seems to happen when we change which Diagram is active on the page. In our app, we maintain references to multiple Diagrams and only have one displayed on the page at a time (by setting its Diagram.div non-null and all others to null).
From the stack trace:
94 |
95 | if (isActive) {
96 | // Set diagram's div to repopulate it with GoJS elements/canvas etc
> 97 | diagramRef.current.div = divRef.current;
| ^
98 | } else {
99 | // Disassociate diagram from div to clear up memory
100 | diagramRef.current.div = null;
(we are using React refs to maintain references to the diagram and div, hence the current
property)
The full stack trace is here as an error.html file: error.html | Slack. Please let me know if there are any additional details you need - thank you in advance for your help.