We are creating diagram by manually adding nodes and connectors using diagram.add() function.
We are using JSON file to create diagram (Please find attached folder for JSON and code file)
But sometimes diagram is not getting created and throwing error as -
core.js:7376 ERROR TypeError: Cannot read properties of undefined (reading 'lock')
at push../node_modules/@syncfusion/ej2-diagrams/src/diagram/diagram.js.Diagram.add (diagram.js:2847:1)
at workflow-structure-manager.service.ts:83:25
at Array.forEach (<anonymous>)
at SafeSubscriber._next (workflow-structure-manager.service.ts:60:38)
at push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:192:1)
at push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:130:1)
at push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:76:1)
at push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53:1)
at push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next (Subject.js:47:1)
at push../node_modules/rxjs/_esm5/internal/ReplaySubject.js.ReplaySubject.nextInfiniteTimeWindow (ReplaySubject.js:41:1)
We are not able to know what is the error.
Attachment:
files_828011d5.zip