Bug at new version of gojs/gojs-angular

Hi,
I upgrade today the following packages in my angular project:
gojs: from 2.1.21 to 2.1.23
gojs-angular: from 1.0.3 to 1.0.4

After the upgrade I am getting error “Error TypeError: Converting circular structure to JSON --> starting at object with constructor ‘E’ …”

This error happaning when I try to do JSON.stringify(diagramObj).
It is important to say that I didn’t change anything in my code besides upgrading the packages. everything worked before. I downgrade the packages and the code worked again.

Do you have any idea why it is happening?

What is the type of diagramObj? Diagram instances are definitely not designed to be serializable, and certainly not via JSON.stringify. That has been the case forever.

In GoJS only model data should be serializable, by calling Model.toJson.

Thank you walter, I used now Model.toJson and it works fine.
But I think it is important that you will know that the last update broke something.

Thank you, but I cannot imagine how serializing Diagram instances could have possibly worked.