Upon submitting a form with react-hook-form ran into the following errors with segment/analytics-next.
it seems like there is an issue trying to clone a html input element into indexdb (first error), then json.stringify is called on a object with circular reference throwing the second error. I noticed that these two errors always occurs together, and never alone by each other so they could be somewhat related to each other.
Another interesting note, the type of my form when this error occurs is
export type FormFields = {
name: string;
type: string[];
};
But changing the type as shown below seems to prevent the errors from occuring.
export type FormFields = {
test_name: string;
test_type: string[];
};