Gojs with bootstrap Modal Uncaught RangeError: Maximum call stack size exceeded

I’m getting
Uncaught RangeError: Maximum call stack size exceeded

While using Bootstrap Modal . i’m trying to create a canvas on bootstrap modal


While calling first time it is running perfectly but for the second time i’m Getting error
also
diag[‘nodeKeyProperty’] = “id”
when i’m passing any dynamic value to id without “” it is running but the connector line cant display

Your model has some cyclical data structures in it. That is not allowed.

Regarding the code diag['nodeKeyProperty'] = 'id', what is diag?