Refresh website (F5) - diagram work incorrect

Hello, First, thank you for the great project.
I used gojs v2.1.38.
I have a problem with my project: In Angular v11.x, my diagram works correctly in local but when I run build and F5 refresh the page, my diagram works incorrectly ( many times). And I figured out the reason is the diagram.model changed. Can you help me fix this? Thank again.
More information: when I turn on the debug on the browser ( F12 ) my diagram works correctly.

That doesn’t seem to be a problem with GoJS but with how you are loading the diagram and model. I’m guessing that there’s some kind of timing issue, because whether you use the debugger or not should not make any difference. I’m not that familiar with Angular, so I cannot really help you.

Thank you for your reply. The last thing, is there any way when model change doesn’t redraw diagram?

It should only update what is needed to be updated. How are you making the change? Are you using the gojs-angular component(s)?