Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit date timestamp object not working #213

Open
moahammadalt opened this issue Jan 26, 2021 · 0 comments
Open

Emit date timestamp object not working #213

moahammadalt opened this issue Jan 26, 2021 · 0 comments

Comments

@moahammadalt
Copy link

What Is the issue?

getting an error while trying to emit timestamp object

Provide issue context below using code examples, images, or links

i have a timestamp create date variable with type of moment.Moment, i'm trying to emit it to the child from parent but i am getting an error and the variable doesn't seem to get serialized.

here is the implementation i am using:

// in parent:
const dateCreated = moment(moment().format()); 
this.parent.emit("callSuccess", dateCreated);

// getting an error
// Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window': function (number) { var b = number % 10,  output = toInt((number...<omitted>... } could not be cloned.

// in child
child.on("callSuccess", (data) => {
// data is undefined here
});

@moahammadalt moahammadalt changed the title Emit date timestamp object nor working Emit date timestamp object not working Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant