sdk-typescript icon indicating copy to clipboard operation
sdk-typescript copied to clipboard

workflow.toJson seems to yield control to React before completion, possibly due to internal asynchrony

Open dfiai opened this issue 2 years ago • 0 comments

First guys thank you for the great instrument it helps me a lot!

What happened: I'm utilizing workflow.toJson and workflow.fromSource to duplicate the workflow. The behavior I'm observing is that when I invoke workflow.toJson, it appears to internally employ an asynchronous process. This seems to result in React relinquishing control before the toJson method has completed its execution. Maybe the problem is in validation lib that you are using?

What you expected to happen: toJson method should work sync

How to reproduce it:

Anything else we need to know?:

Environment:

google chrome, windows, ubuntu

dfiai avatar Aug 31 '23 10:08 dfiai